From: Ladislav Michl <[email protected]> Use DEFAULT_SHELL instead of literal "/bin/sh".
Signed-off-by: Ladislav Michl <[email protected]> --- archival/libunarchive/data_extract_to_command.c | 5 +++-- loginutils/sulogin.c | 2 +- runit/svlogd.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/archival/libunarchive/data_extract_to_command.c b/archival/libunarchive/data_extract_to_command.c index 983c530..a0a1fe2 100644 --- a/archival/libunarchive/data_extract_to_command.c +++ b/archival/libunarchive/data_extract_to_command.c @@ -102,8 +102,9 @@ void FAST_FUNC data_extract_to_command(archive_handle_t *archive_handle) close(p[1]); xdup2(p[0], STDIN_FILENO); signal(SIGPIPE, SIG_DFL); - execl("/bin/sh", "/bin/sh" + 5, "-c", archive_handle->tar__to_command, NULL); - bb_perror_msg_and_die("can't execute '%s'", "/bin/sh"); + execl(DEFAULT_SHELL, DEFAULT_SHELL_SHORT_NAME, "-c", + archive_handle->tar__to_command, NULL); + bb_perror_msg_and_die("can't execute '%s'", DEFAULT_SHELL); } close(p[0]); /* Our caller is expected to do signal(SIGPIPE, SIG_IGN) diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c index 6e3d3b0..52bb571 100644 --- a/loginutils/sulogin.c +++ b/loginutils/sulogin.c @@ -102,7 +102,7 @@ int sulogin_main(int argc UNUSED_PARAM, char **argv) if (!shell) shell = getenv("sushell"); if (!shell) { - shell = "/bin/sh"; + shell = DEFAULT_SHELL; if (pwd->pw_shell[0]) shell = pwd->pw_shell; } diff --git a/runit/svlogd.c b/runit/svlogd.c index fc8b4ab..9fe81b9 100644 --- a/runit/svlogd.c +++ b/runit/svlogd.c @@ -354,7 +354,7 @@ static void processorstart(struct logdir *ld) xmove_fd(fd, 5); // getenv("SHELL")? - execl("/bin/sh", "/bin/sh" + 5, "-c", ld->processor, (char*) NULL); + execl(DEFAULT_SHELL, DEFAULT_SHELL_SHORT_NAME, "-c", ld->processor, (char*) NULL); bb_perror_msg_and_die(FATAL"can't %s processor %s", "run", ld->name); } ld->fnsave[26] = sv_ch; /* ...restore */ _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
