aboutsummaryrefslogtreecommitdiff
path: root/loginutils/deluser.c
diff options
context:
space:
mode:
Diffstat (limited to 'loginutils/deluser.c')
-rw-r--r--loginutils/deluser.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/loginutils/deluser.c b/loginutils/deluser.c
index 01a9386bc..110cd6310 100644
--- a/loginutils/deluser.c
+++ b/loginutils/deluser.c
@@ -114,16 +114,22 @@ int deluser_main(int argc, char **argv)
114 } 114 }
115 } while (ENABLE_FEATURE_SHADOWPASSWDS && pfile); 115 } while (ENABLE_FEATURE_SHADOWPASSWDS && pfile);
116 116
117 if (ENABLE_DELGROUP && do_deluser > 0) { 117 if (do_deluser > 0) {
118 /* "deluser USER" also should try to delete 118 /* Delete user from all groups */
119 * same-named group. IOW: do "delgroup USER" 119 if (update_passwd(bb_path_group_file, NULL, NULL, name) == -1)
120 */ 120 return EXIT_FAILURE;
121
122 if (ENABLE_DELGROUP) {
123 /* "deluser USER" also should try to delete
124 * same-named group. IOW: do "delgroup USER"
125 */
121// On debian deluser is a perl script that calls userdel. 126// On debian deluser is a perl script that calls userdel.
122// From man userdel: 127// From man userdel:
123// If USERGROUPS_ENAB is defined to yes in /etc/login.defs, userdel will 128// If USERGROUPS_ENAB is defined to yes in /etc/login.defs, userdel will
124// delete the group with the same name as the user. 129// delete the group with the same name as the user.
125 do_deluser = -1; 130 do_deluser = -1;
126 goto do_delgroup; 131 goto do_delgroup;
132 }
127 } 133 }
128 return EXIT_SUCCESS; 134 return EXIT_SUCCESS;
129 } 135 }