*: s/"/bin/sh"/DEFAULT_SHELL, run_shell() API fix, remove unneeded strdup
function old new delta run_shell 157 166 +9 su_main 477 470 -7 sulogin_main 515 503 -12 Signed-off-by: Ladislav Michl <Ladislav.Michl@seznam.cz> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
committed by
Denys Vlasenko
parent
1b14cdb27c
commit
a73b87e934
@@ -102,8 +102,8 @@ 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)
|
||||
|
Reference in New Issue
Block a user