]> granicus.if.org Git - shadow/commitdiff
(process_flags): prefer fail_exit to exit. This avoid
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Fri, 28 Dec 2007 19:15:14 +0000 (19:15 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Fri, 28 Dec 2007 19:15:14 +0000 (19:15 +0000)
an explicit call to audit_logger().

ChangeLog
src/groupadd.c

index 3401ed8b1d6de18b18f4ee9d6b0dfcd42caa41aa..7b323d441dc6d1f1bf724e0ddbeffeed7366f383 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,8 @@
        Use (!gflg), which is clearer than (!gflg || !oflg).
        * src/groupadd.c (find_new_gid): find_new_gid is never called when an
        GID is specified with -g. Simplify find_new_gid accordingly.
+       * src/groupadd.c (process_flags): prefer fail_exit to exit. This avoid
+       an explicit call to audit_logger().
 
 2007-12-28  Nicolas François  <nicolas.francois@centraliens.net>
 
index 4a21dccc32e101ecfa3c37423957d548d299ebf6..0c6819dac3800a98adfeb4e63899e06e4cfba3fe 100644 (file)
@@ -453,14 +453,10 @@ static void process_flags (int argc, char **argv)
                /* The group already exist */
                if (fflg) {
                        /* OK, no need to do anything */
-                       exit (E_SUCCESS);
+                       fail_exit (E_SUCCESS);
                }
                fprintf (stderr, _("%s: group %s exists\n"), Prog, group_name);
-#ifdef WITH_AUDIT
-               audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
-                             "adding group", group_name, -1, 0);
-#endif
-               exit (E_NAME_IN_USE);
+               fail_exit (E_NAME_IN_USE);
        }
 
        if (gflg && (getgrgid (group_id) != NULL)) {