diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2003-09-02 02:36:18 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2003-09-02 02:36:18 +0000 |
commit | dc4e75ef7ca135c836d22e380847672cf5b3773b (patch) | |
tree | d2ff4fef7b9192de63761935103699569ecbb2ee /loginutils | |
parent | 005f83adf511ab89296639abbef737ad4e5826f9 (diff) | |
download | busybox-w32-dc4e75ef7ca135c836d22e380847672cf5b3773b.tar.gz busybox-w32-dc4e75ef7ca135c836d22e380847672cf5b3773b.tar.bz2 busybox-w32-dc4e75ef7ca135c836d22e380847672cf5b3773b.zip |
move all "-/bin/sh" "/bin/sh" and "sh" to libbb/messages.c file as one
constant.
Vodz last_patch_107
Diffstat (limited to 'loginutils')
-rw-r--r-- | loginutils/adduser.c | 3 | ||||
-rw-r--r-- | loginutils/login.c | 10 | ||||
-rw-r--r-- | loginutils/su.c | 1 |
3 files changed, 7 insertions, 7 deletions
diff --git a/loginutils/adduser.c b/loginutils/adduser.c index 41dc9f019..c4ab557d0 100644 --- a/loginutils/adduser.c +++ b/loginutils/adduser.c | |||
@@ -53,7 +53,6 @@ typedef struct { | |||
53 | static const char default_passwd[] = "x"; | 53 | static const char default_passwd[] = "x"; |
54 | static const char default_gecos[] = "Linux User,,,"; | 54 | static const char default_gecos[] = "Linux User,,,"; |
55 | static const char default_home_prefix[] = "/home"; | 55 | static const char default_home_prefix[] = "/home"; |
56 | static const char default_shell[] = "/bin/sh"; | ||
57 | 56 | ||
58 | #ifdef CONFIG_FEATURE_SHADOWPASSWDS | 57 | #ifdef CONFIG_FEATURE_SHADOWPASSWDS |
59 | /* shadow in use? */ | 58 | /* shadow in use? */ |
@@ -257,7 +256,7 @@ int adduser_main(int argc, char **argv) | |||
257 | const char *login; | 256 | const char *login; |
258 | const char *gecos = default_gecos; | 257 | const char *gecos = default_gecos; |
259 | const char *home = NULL; | 258 | const char *home = NULL; |
260 | const char *shell = default_shell; | 259 | const char *shell = DEFAULT_SHELL; |
261 | const char *usegroup = NULL; | 260 | const char *usegroup = NULL; |
262 | int flags; | 261 | int flags; |
263 | int setpass = 1; | 262 | int setpass = 1; |
diff --git a/loginutils/login.c b/loginutils/login.c index c2bada258..3fca899c0 100644 --- a/loginutils/login.c +++ b/loginutils/login.c | |||
@@ -65,7 +65,7 @@ extern int login_main(int argc, char **argv) | |||
65 | char full_tty[200]; | 65 | char full_tty[200]; |
66 | char fromhost[512]; | 66 | char fromhost[512]; |
67 | char username[USERNAME_SIZE]; | 67 | char username[USERNAME_SIZE]; |
68 | char *tmp; | 68 | const char *tmp; |
69 | int amroot; | 69 | int amroot; |
70 | int flag; | 70 | int flag; |
71 | int failed; | 71 | int failed; |
@@ -267,15 +267,17 @@ auth_ok: | |||
267 | chmod ( full_tty, 0600 ); | 267 | chmod ( full_tty, 0600 ); |
268 | 268 | ||
269 | change_identity ( pw ); | 269 | change_identity ( pw ); |
270 | setup_environment ( pw-> pw_shell, 1, !opt_preserve, pw ); | 270 | tmp = pw-> pw_shell; |
271 | if(!tmp || !*tmp) | ||
272 | tmp = DEFAULT_SHELL; | ||
273 | setup_environment ( tmp, 1, !opt_preserve, pw ); | ||
271 | 274 | ||
272 | motd ( ); | 275 | motd ( ); |
273 | signal ( SIGALRM, SIG_DFL ); /* default alarm signal */ | 276 | signal ( SIGALRM, SIG_DFL ); /* default alarm signal */ |
274 | 277 | ||
275 | if ( pw-> pw_uid == 0 ) | 278 | if ( pw-> pw_uid == 0 ) |
276 | syslog ( LOG_INFO, "root login %s\n", fromhost ); | 279 | syslog ( LOG_INFO, "root login %s\n", fromhost ); |
277 | 280 | run_shell ( tmp, 1, 0, 0 | |
278 | run_shell ( pw-> pw_shell, 1, 0, 0 | ||
279 | #ifdef CONFIG_SELINUX | 281 | #ifdef CONFIG_SELINUX |
280 | , sid | 282 | , sid |
281 | #endif | 283 | #endif |
diff --git a/loginutils/su.c b/loginutils/su.c index 04c213e4e..2d7a7ac05 100644 --- a/loginutils/su.c +++ b/loginutils/su.c | |||
@@ -21,7 +21,6 @@ | |||
21 | 21 | ||
22 | 22 | ||
23 | /* The shell to run if none is given in the user's passwd entry. */ | 23 | /* The shell to run if none is given in the user's passwd entry. */ |
24 | #define DEFAULT_SHELL "/bin/sh" | ||
25 | #define DEFAULT_USER "root" | 24 | #define DEFAULT_USER "root" |
26 | 25 | ||
27 | //#define SYSLOG_SUCCESS | 26 | //#define SYSLOG_SUCCESS |