*: 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:
Ladislav Michl
2010-06-27 03:23:31 +02:00
committed by Denys Vlasenko
parent 1b14cdb27c
commit a73b87e934
8 changed files with 58 additions and 54 deletions

View File

@@ -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 */