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

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