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

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

No files matched your search

+7 -4
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