summaryrefslogtreecommitdiff
path: root/loginutils/sulogin.c
diff options
context:
space:
mode:
authorLadislav Michl2010-06-27 03:23:31 +0200
committerDenys Vlasenko2010-06-27 03:23:31 +0200
commita73b87e9343df2a6f14e328a977e7b70eb3ed707 (patch)
tree564869bde93c870b20f6d4d8a3da71e42b629f2e /loginutils/sulogin.c
parent1b14cdb27ca5e8104a824424731be430c8592dd6 (diff)
downloadbusybox-a73b87e9343df2a6f14e328a977e7b70eb3ed707.zip
busybox-a73b87e9343df2a6f14e328a977e7b70eb3ed707.tar.gz
*: 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 6e3d3b0..3516013 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);