From a73b87e9343df2a6f14e328a977e7b70eb3ed707 Mon Sep 17 00:00:00 2001 From: Ladislav Michl Date: Sun, 27 Jun 2010 03:23:31 +0200 Subject: *: 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 Signed-off-by: Denys Vlasenko --- loginutils/sulogin.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'loginutils/sulogin.c') diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c index 6e3d3b019..3516013f1 100644 --- a/loginutils/sulogin.c +++ b/loginutils/sulogin.c @@ -101,11 +101,9 @@ int sulogin_main(int argc UNUSED_PARAM, char **argv) shell = getenv("SUSHELL"); if (!shell) shell = getenv("sushell"); - if (!shell) { - shell = "/bin/sh"; - if (pwd->pw_shell[0]) - shell = pwd->pw_shell; - } + if (!shell) + shell = pwd->pw_shell; + /* Exec login shell with no additional parameters. Never returns. */ run_shell(shell, 1, NULL, NULL); -- cgit v1.2.3