From: nekral-guest Date: Sat, 8 Mar 2008 16:20:55 +0000 (+0000) Subject: Do not log that the group was deleted if an error occurred. X-Git-Tag: 4.1.1~30 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9e07fec6ba51349760875b658442f0cb46264fef;p=shadow Do not log that the group was deleted if an error occurred. --- diff --git a/ChangeLog b/ChangeLog index a9261198..13e6846c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-03-08 Nicolas François + + * src/groupdel.c: Do not log that the group was deleted if an + error occurred. + 2008-03-08 Nicolas François * src/groupdel.c: Do not raise an error if the group does not diff --git a/src/groupdel.c b/src/groupdel.c index 69e49c55..c67ec699 100644 --- a/src/groupdel.c +++ b/src/groupdel.c @@ -108,11 +108,6 @@ static void grp_update (void) } } #endif /* SHADOWGRP */ -#ifdef WITH_AUDIT - audit_logger (AUDIT_USER_CHAUTHTOK, Prog, "deleting group", group_name, - group_id, 1); -#endif - SYSLOG ((LOG_INFO, "remove group `%s'\n", group_name)); return; } @@ -124,6 +119,12 @@ static void grp_update (void) */ static void close_files (void) { +#ifdef WITH_AUDIT + audit_logger (AUDIT_USER_CHAUTHTOK, Prog, "deleting group", group_name, + group_id, 1); +#endif + SYSLOG ((LOG_INFO, "remove group `%s'\n", group_name)); + if (!gr_close ()) { fprintf (stderr, _("%s: cannot rewrite group file\n"), Prog); errors++;