diff options
| author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-11-26 07:17:52 +0000 |
|---|---|---|
| committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-11-26 07:17:52 +0000 |
| commit | a0ec7918f3da09156c3897fa63518e16af11081a (patch) | |
| tree | 9b718211f1dcd71ac51ea95e1a541694f348935b /loginutils/adduser.c | |
| parent | 52c886144fd0491fd3b60f04a9f144cac6c12de4 (diff) | |
| download | busybox-w32-1_6_2.tar.gz busybox-w32-1_6_2.tar.bz2 busybox-w32-1_6_2.zip | |
apply accumulated post-1.6.1 patches, and bump version to 1.6.21_6_2
Diffstat (limited to 'loginutils/adduser.c')
| -rw-r--r-- | loginutils/adduser.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/loginutils/adduser.c b/loginutils/adduser.c index 82a4381ad..ee01fc9ac 100644 --- a/loginutils/adduser.c +++ b/loginutils/adduser.c | |||
| @@ -109,8 +109,9 @@ static int adduser(struct passwd *p) | |||
| 109 | if (putpwent(p, file) == -1) { | 109 | if (putpwent(p, file) == -1) { |
| 110 | bb_perror_nomsg_and_die(); | 110 | bb_perror_nomsg_and_die(); |
| 111 | } | 111 | } |
| 112 | if (ENABLE_FEATURE_CLEAN_UP) | 112 | /* Do fclose even if !ENABLE_FEATURE_CLEAN_UP. |
| 113 | fclose(file); | 113 | * We will exec passwd, files must be flushed & closed before that! */ |
| 114 | fclose(file); | ||
| 114 | 115 | ||
| 115 | #if ENABLE_FEATURE_SHADOWPASSWDS | 116 | #if ENABLE_FEATURE_SHADOWPASSWDS |
| 116 | /* add to shadow if necessary */ | 117 | /* add to shadow if necessary */ |
| @@ -123,8 +124,7 @@ static int adduser(struct passwd *p) | |||
| 123 | 0, /* sp->sp_min */ | 124 | 0, /* sp->sp_min */ |
| 124 | 99999, /* sp->sp_max */ | 125 | 99999, /* sp->sp_max */ |
| 125 | 7); /* sp->sp_warn */ | 126 | 7); /* sp->sp_warn */ |
| 126 | if (ENABLE_FEATURE_CLEAN_UP) | 127 | fclose(file); |
| 127 | fclose(file); | ||
| 128 | } | 128 | } |
| 129 | #endif | 129 | #endif |
| 130 | 130 | ||
| @@ -134,7 +134,7 @@ static int adduser(struct passwd *p) | |||
| 134 | if (addgroup) addgroup_wrapper(p); | 134 | if (addgroup) addgroup_wrapper(p); |
| 135 | 135 | ||
| 136 | /* Clear the umask for this process so it doesn't | 136 | /* Clear the umask for this process so it doesn't |
| 137 | * * screw up the permissions on the mkdir and chown. */ | 137 | * screw up the permissions on the mkdir and chown. */ |
| 138 | umask(0); | 138 | umask(0); |
| 139 | if (!(option_mask32 & OPT_DONT_MAKE_HOME)) { | 139 | if (!(option_mask32 & OPT_DONT_MAKE_HOME)) { |
| 140 | /* Set the owner and group so it is owned by the new user, | 140 | /* Set the owner and group so it is owned by the new user, |
