projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb373db
)
hush: fix dot builtin to not search current directory
author
Denys Vlasenko
<vda.linux@googlemail.com>
Sat, 27 Jan 2018 18:05:59 +0000
(19:05 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Sat, 27 Jan 2018 18:05:59 +0000
(19:05 +0100)
function old new delta
builtin_source 182 209 +27
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/hush.c
patch
|
blob
|
history
diff --git
a/shell/hush.c
b/shell/hush.c
index cf3c731bcafab6a94ddaa69858012b92799ea294..2d1cc5ca6d0a44e0ec39f5d83d779bc38aced260 100644
(file)
--- a/
shell/hush.c
+++ b/
shell/hush.c
@@
-10211,6
+10211,11
@@
static int FAST_FUNC builtin_source(char **argv)
arg_path = find_in_path(filename);
if (arg_path)
filename = arg_path;
+ else /* add "if (!HUSH_BASH_SOURCE_CURDIR)" if users want bash-compat */ {
+ errno = ENOENT;
+ bb_simple_perror_msg(filename);
+ return EXIT_FAILURE;
+ }
}
input = remember_FILE(fopen_or_warn(filename, "r"));
free(arg_path);