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:
b0648b0
)
ash: fix redir_leak.tests if STANDALONE=y
author
Denys Vlasenko
<vda.linux@googlemail.com>
Wed, 26 Jul 2017 11:42:53 +0000
(13:42 +0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Wed, 26 Jul 2017 11:42:53 +0000
(13:42 +0200)
If STANDALONE and we run a NOEXEC applet, saved copies of redirected fds
were visible for the child. They have CLOEXEC bit, yes, but we do not exec
in this case.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/ash.c
patch
|
blob
|
history
diff --git
a/shell/ash.c
b/shell/ash.c
index c96ec939e30983012135e8c41a0d19fb87ce8845..524580e8aa399f25dcb260d9502ac3c1e828a1ed 100644
(file)
--- a/
shell/ash.c
+++ b/
shell/ash.c
@@
-7698,6
+7698,7
@@
tryexec(IF_FEATURE_SH_STANDALONE(int applet_no,) char *cmd, char **argv, char **
clearenv();
while (*envp)
putenv(*envp++);
+ popredir(/*drop:*/ 1, /*restore:*/ 0);
run_applet_no_and_exit(applet_no, cmd, argv);
}
/* re-exec ourselves with the new arguments */