aboutsummaryrefslogtreecommitdiff
path: root/loginutils/sulogin.c
diff options
context:
space:
mode:
authorLadislav Michl <Ladislav.Michl@seznam.cz>2010-06-27 03:23:31 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-06-27 03:23:31 +0200
commita73b87e9343df2a6f14e328a977e7b70eb3ed707 (patch)
tree564869bde93c870b20f6d4d8a3da71e42b629f2e /loginutils/sulogin.c
parent1b14cdb27ca5e8104a824424731be430c8592dd6 (diff)
downloadbusybox-w32-a73b87e9343df2a6f14e328a977e7b70eb3ed707.tar.gz
busybox-w32-a73b87e9343df2a6f14e328a977e7b70eb3ed707.tar.bz2
busybox-w32-a73b87e9343df2a6f14e328a977e7b70eb3ed707.zip
*: 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>
Diffstat (limited to 'loginutils/sulogin.c')
-rw-r--r--loginutils/sulogin.c8
1 files changed, 3 insertions, 5 deletions
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)
101 shell = getenv("SUSHELL"); 101 shell = getenv("SUSHELL");
102 if (!shell) 102 if (!shell)
103 shell = getenv("sushell"); 103 shell = getenv("sushell");
104 if (!shell) { 104 if (!shell)
105 shell = "/bin/sh"; 105 shell = pwd->pw_shell;
106 if (pwd->pw_shell[0]) 106
107 shell = pwd->pw_shell;
108 }
109 /* Exec login shell with no additional parameters. Never returns. */ 107 /* Exec login shell with no additional parameters. Never returns. */
110 run_shell(shell, 1, NULL, NULL); 108 run_shell(shell, 1, NULL, NULL);
111 109