]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
* src/groupmod.c: Check atexit failures.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Mon, 15 Aug 2011 14:38:49 +0000 (14:38 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Mon, 15 Aug 2011 14:38:49 +0000 (14:38 +0000)
ChangeLog
src/groupmod.c

index 0b86af51206fcc2af22b12831069c4abac7a14b7..3ef73198ee1a12efaf2f5a87389f1bdc5dc54788 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 
        * src/groupmod.c: Ignore return value from snprintf.
        * src/groupmod.c: Add static qualifier to the cleanup structures.
+       * src/groupmod.c: Check atexit failures.
 
 2011-08-15  Nicolas François  <nicolas.francois@centraliens.net>
 
index c769f6b6108f62f8f38472326433330c2dcdd787..acd059646a821a1e298ccc5ee0c7bfce6af17845 100644 (file)
@@ -736,7 +736,6 @@ int main (int argc, char **argv)
 #ifdef WITH_AUDIT
        audit_help_open ();
 #endif
-       atexit (do_cleanups);
 
        /*
         * Get my name so that I can use it to report errors.
@@ -747,6 +746,13 @@ int main (int argc, char **argv)
        (void) bindtextdomain (PACKAGE, LOCALEDIR);
        (void) textdomain (PACKAGE);
 
+       if (atexit (do_cleanups) != 0) {
+               fprintf (stderr,
+                        _("%s: Cannot setup cleanup service.\n"),
+                        Prog);
+               exit (1);
+       }
+
        process_flags (argc, argv);
 
        OPENLOG ("groupmod");