Do not raise an error if the group does not exist in the gshadow file.
This commit is contained in:
parent
987d853aa9
commit
d44f1dfeca
@ -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>
|
||||
|
||||
* etc/login.defs: Document MAX_MEMBERS_PER_GROUP.
|
||||
|
2
NEWS
2
NEWS
@ -31,6 +31,8 @@ shadow-4.1.0 -> shadow-4.1.1 UNRELEASED
|
||||
- groupadd
|
||||
* New option -p/--password to specify an encrypted password.
|
||||
* New option -r, --system for system accounts.
|
||||
- groupdel
|
||||
* Do not fail if the group does not exist in the gshadow file.
|
||||
- groupmems
|
||||
* Fix buffer overflow when adding an user to a group. Thanks to Peter Vrabec.
|
||||
- groupmod
|
||||
|
@ -99,11 +99,14 @@ static void grp_update (void)
|
||||
/*
|
||||
* Delete the shadow group entries as well.
|
||||
*/
|
||||
if (is_shadow_grp && !sgr_remove (group_name)) {
|
||||
if (is_shadow_grp && (sgr_locate (group_name) != NULL)) {
|
||||
if (!sgr_remove (group_name)) {
|
||||
fprintf (stderr,
|
||||
_("%s: error removing shadow group entry\n"), Prog);
|
||||
_("%s: error removing shadow group entry\n"),
|
||||
Prog);
|
||||
errors++;
|
||||
}
|
||||
}
|
||||
#endif /* SHADOWGRP */
|
||||
#ifdef WITH_AUDIT
|
||||
audit_logger (AUDIT_USER_CHAUTHTOK, Prog, "deleting group", group_name,
|
||||
|
Loading…
Reference in New Issue
Block a user