aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--loginutils/addgroup.c17
-rw-r--r--loginutils/adduser.c2
2 files changed, 17 insertions, 2 deletions
diff --git a/loginutils/addgroup.c b/loginutils/addgroup.c
index e49278efe..215e4a9e0 100644
--- a/loginutils/addgroup.c
+++ b/loginutils/addgroup.c
@@ -79,7 +79,22 @@ static void new_group(char *group, gid_t gid)
79 if (ENABLE_FEATURE_CLEAN_UP) 79 if (ENABLE_FEATURE_CLEAN_UP)
80 free(p); 80 free(p);
81#if ENABLE_FEATURE_SHADOWPASSWDS 81#if ENABLE_FEATURE_SHADOWPASSWDS
82 /* Ignore errors: if file is missing we suppose admin doesn't want it */ 82 /* /etc/gshadow fields:
83 * 1. Group name.
84 * 2. Encrypted password.
85 * If set, non-members of the group can join the group
86 * by typing the password for that group using the newgrp command.
87 * If the value is of this field ! then no user is allowed
88 * to access the group using the newgrp command. A value of !!
89 * is treated the same as a value of ! only it indicates
90 * that a password has never been set before. If the value is null,
91 * only group members can log into the group.
92 * 3. Group administrators (comma delimited list).
93 * Group members listed here can add or remove group members
94 * using the gpasswd command.
95 * 4. Group members (comma delimited list).
96 */
97 /* Ignore errors: if file is missing we assume admin doesn't want it */
83 update_passwd(bb_path_gshadow_file, group, "!::", NULL); 98 update_passwd(bb_path_gshadow_file, group, "!::", NULL);
84#endif 99#endif
85} 100}
diff --git a/loginutils/adduser.c b/loginutils/adduser.c
index 136dcdff8..0e9936ad1 100644
--- a/loginutils/adduser.c
+++ b/loginutils/adduser.c
@@ -177,7 +177,7 @@ int adduser_main(int argc UNUSED_PARAM, char **argv)
177 * 5. maximum days password is valid 177 * 5. maximum days password is valid
178 * 6. days before password is to expire that user is warned 178 * 6. days before password is to expire that user is warned
179 * 7. days after password expires that account is disabled 179 * 7. days after password expires that account is disabled
180 * 8. unix date when login expires (may no longer be used) 180 * 8. unix date when login expires (i.e. when it may no longer be used)
181 */ 181 */
182 /* fields: 2 3 4 5 6 78 */ 182 /* fields: 2 3 4 5 6 78 */
183 p = xasprintf("!:%u:0:99999:7:::", (unsigned)(time(NULL)) / (24*60*60)); 183 p = xasprintf("!:%u:0:99999:7:::", (unsigned)(time(NULL)) / (24*60*60));