Do not log that the group was deleted if an error occurred.

This commit is contained in:
nekral-guest 2008-03-08 16:20:55 +00:00
parent d44f1dfeca
commit 9e07fec6ba
2 changed files with 11 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2008-03-08 Nicolas François <nicolas.francois@centraliens.net>
* src/groupdel.c: Do not log that the group was deleted if an
error occurred.
2008-03-08 Nicolas François <nicolas.francois@centraliens.net> 2008-03-08 Nicolas François <nicolas.francois@centraliens.net>
* src/groupdel.c: Do not raise an error if the group does not * src/groupdel.c: Do not raise an error if the group does not

View File

@ -108,11 +108,6 @@ static void grp_update (void)
} }
} }
#endif /* SHADOWGRP */ #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; return;
} }
@ -124,6 +119,12 @@ static void grp_update (void)
*/ */
static void close_files (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 ()) { if (!gr_close ()) {
fprintf (stderr, _("%s: cannot rewrite group file\n"), Prog); fprintf (stderr, _("%s: cannot rewrite group file\n"), Prog);
errors++; errors++;