Do not raise an error if the group does not exist in the gshadow file.

This commit is contained in:
nekral-guest 2008-03-08 16:17:07 +00:00
parent 987d853aa9
commit d44f1dfeca
3 changed files with 14 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2008-03-08 Nicolas François <nicolas.francois@centraliens.net>
* src/groupdel.c: Do not raise an error if the group does not
exist in the gshadow file.
2008-03-08 Nicolas François <nicolas.francois@centraliens.net> 2008-03-08 Nicolas François <nicolas.francois@centraliens.net>
* etc/login.defs: Document MAX_MEMBERS_PER_GROUP. * etc/login.defs: Document MAX_MEMBERS_PER_GROUP.

2
NEWS
View File

@ -31,6 +31,8 @@ shadow-4.1.0 -> shadow-4.1.1 UNRELEASED
- groupadd - groupadd
* New option -p/--password to specify an encrypted password. * New option -p/--password to specify an encrypted password.
* New option -r, --system for system accounts. * New option -r, --system for system accounts.
- groupdel
* Do not fail if the group does not exist in the gshadow file.
- groupmems - groupmems
* Fix buffer overflow when adding an user to a group. Thanks to Peter Vrabec. * Fix buffer overflow when adding an user to a group. Thanks to Peter Vrabec.
- groupmod - groupmod

View File

@ -99,10 +99,13 @@ static void grp_update (void)
/* /*
* Delete the shadow group entries as well. * Delete the shadow group entries as well.
*/ */
if (is_shadow_grp && !sgr_remove (group_name)) { if (is_shadow_grp && (sgr_locate (group_name) != NULL)) {
fprintf (stderr, if (!sgr_remove (group_name)) {
_("%s: error removing shadow group entry\n"), Prog); fprintf (stderr,
errors++; _("%s: error removing shadow group entry\n"),
Prog);
errors++;
}
} }
#endif /* SHADOWGRP */ #endif /* SHADOWGRP */
#ifdef WITH_AUDIT #ifdef WITH_AUDIT