aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-07-26 13:42:53 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-07-26 13:42:53 +0200
commitb31b61bb9bff8a920b7e25b83e3aa08f7c907331 (patch)
tree6a4bbc0e30e933d709cedbf2f3d5969675c3dfbb
parentb0648b0e7874e8551df64708532346a049ab7f2c (diff)
downloadbusybox-w32-b31b61bb9bff8a920b7e25b83e3aa08f7c907331.tar.gz
busybox-w32-b31b61bb9bff8a920b7e25b83e3aa08f7c907331.tar.bz2
busybox-w32-b31b61bb9bff8a920b7e25b83e3aa08f7c907331.zip
ash: fix redir_leak.tests if STANDALONE=y
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>
-rw-r--r--shell/ash.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c
index c96ec939e..524580e8a 100644
--- 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 **
7698 clearenv(); 7698 clearenv();
7699 while (*envp) 7699 while (*envp)
7700 putenv(*envp++); 7700 putenv(*envp++);
7701 popredir(/*drop:*/ 1, /*restore:*/ 0);
7701 run_applet_no_and_exit(applet_no, cmd, argv); 7702 run_applet_no_and_exit(applet_no, cmd, argv);
7702 } 7703 }
7703 /* re-exec ourselves with the new arguments */ 7704 /* re-exec ourselves with the new arguments */