summaryrefslogtreecommitdiff
path: root/loginutils/sulogin.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-09-10 13:15:28 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-09-10 13:15:28 +0000
commita2f61012b6f93473ed002e6609557cb1cd81b7dd (patch)
tree51ce422afbda2249a5de22e834ed04e200e0961f /loginutils/sulogin.c
parentac074b3f87cc22c2ddadb074d630156fea720744 (diff)
downloadbusybox-w32-a2f61012b6f93473ed002e6609557cb1cd81b7dd.tar.gz
busybox-w32-a2f61012b6f93473ed002e6609557cb1cd81b7dd.tar.bz2
busybox-w32-a2f61012b6f93473ed002e6609557cb1cd81b7dd.zip
setup_environment: code shrink
run_shell: mark as NORETURN setup_environment, run_shell: add usage comments login: add FIXME :( function old new delta UNSPEC_print 64 66 +2 sulogin_main 509 506 -3 mkfs_minix_main 3070 3067 -3 login_main 1615 1612 -3 su_main 461 448 -13 setup_environment 261 206 -55 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/5 up/down: 2/-77) Total: -75 bytes text data bss dec hex filename 772578 1051 10724 784353 bf7e1 busybox_old 772502 1051 10724 784277 bf795 busybox_unstripped
Diffstat (limited to 'loginutils/sulogin.c')
-rw-r--r--loginutils/sulogin.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c
index 5f0a4081d..5c73bda93 100644
--- a/loginutils/sulogin.c
+++ b/loginutils/sulogin.c
@@ -112,14 +112,15 @@ int sulogin_main(int argc, char **argv)
112 USE_SELINUX(renew_current_security_context()); 112 USE_SELINUX(renew_current_security_context());
113 113
114 shell = getenv("SUSHELL"); 114 shell = getenv("SUSHELL");
115 if (!shell) shell = getenv("sushell"); 115 if (!shell)
116 shell = getenv("sushell");
116 if (!shell) { 117 if (!shell) {
117 shell = "/bin/sh"; 118 shell = "/bin/sh";
118 if (pwd->pw_shell[0]) 119 if (pwd->pw_shell[0])
119 shell = pwd->pw_shell; 120 shell = pwd->pw_shell;
120 } 121 }
121 run_shell(shell, 1, 0, 0); 122 /* Exec login shell with no additional parameters. Never returns. */
122 /* never returns */ 123 run_shell(shell, 1, NULL, NULL);
123 124
124auth_error: 125auth_error:
125 bb_error_msg_and_die("no password entry for 'root'"); 126 bb_error_msg_and_die("no password entry for 'root'");