diff options
author | Glenn L McGrath | 2003-09-02 02:36:18 +0000 |
---|---|---|
committer | Glenn L McGrath | 2003-09-02 02:36:18 +0000 |
commit | dc4e75ef7ca135c836d22e380847672cf5b3773b (patch) | |
tree | d2ff4fef7b9192de63761935103699569ecbb2ee /loginutils/login.c | |
parent | 005f83adf511ab89296639abbef737ad4e5826f9 (diff) | |
download | busybox-dc4e75ef7ca135c836d22e380847672cf5b3773b.zip busybox-dc4e75ef7ca135c836d22e380847672cf5b3773b.tar.gz |
move all "-/bin/sh" "/bin/sh" and "sh" to libbb/messages.c file as one
constant.
Vodz last_patch_107
Diffstat (limited to 'loginutils/login.c')
-rw-r--r-- | loginutils/login.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/loginutils/login.c b/loginutils/login.c index c2bada2..3fca899 100644 --- a/loginutils/login.c +++ b/loginutils/login.c @@ -65,7 +65,7 @@ extern int login_main(int argc, char **argv) char full_tty[200]; char fromhost[512]; char username[USERNAME_SIZE]; - char *tmp; + const char *tmp; int amroot; int flag; int failed; @@ -267,15 +267,17 @@ auth_ok: chmod ( full_tty, 0600 ); change_identity ( pw ); - setup_environment ( pw-> pw_shell, 1, !opt_preserve, pw ); + tmp = pw-> pw_shell; + if(!tmp || !*tmp) + tmp = DEFAULT_SHELL; + setup_environment ( tmp, 1, !opt_preserve, pw ); motd ( ); signal ( SIGALRM, SIG_DFL ); /* default alarm signal */ if ( pw-> pw_uid == 0 ) syslog ( LOG_INFO, "root login %s\n", fromhost ); - - run_shell ( pw-> pw_shell, 1, 0, 0 + run_shell ( tmp, 1, 0, 0 #ifdef CONFIG_SELINUX , sid #endif |