]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
* src/newusers.c: Open syslog with the right identification name.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Fri, 22 Aug 2008 02:29:31 +0000 (02:29 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Fri, 22 Aug 2008 02:29:31 +0000 (02:29 +0000)
* src/newusers.c: Mark the files as locked only if they are really
locked (i.e. if shadow is not enabled, the files are not locked).

ChangeLog
src/newusers.c

index 60d611008224635e3fb0ca2ed2e41e5288bf5d95..84946d8c6637df95c6d48b4437a0bc797ade7077 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-08-20  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * src/newusers.c: Open syslog with the right identification name.
+       * src/newusers.c: Mark the files as locked only if they are really
+       locked (i.e. if shadow is not enabled, the files are not locked).
+
 2008-08-20  Nicolas François  <nicolas.francois@centraliens.net>
 
        * NEWS, src/gpasswd.c: Use getopt_long instead of getopt. Added
index 7e3202614150b701f34ce672ae2c05fccbca4790..64ca99508573553730ae2ad1a47f8b4a9c27151a 100644 (file)
@@ -614,13 +614,15 @@ static void open_files (void)
                fail_exit (1);
        }
        pw_locked = true;
-       if (is_shadow && (spw_lock () == 0)) {
-               fprintf (stderr,
-                        _("%s: cannot lock %s; try again later.\n"),
-                        Prog, spw_dbname ());
-               fail_exit (1);
+       if (is_shadow) {
+               if (spw_lock () == 0) {
+                       fprintf (stderr,
+                                _("%s: cannot lock %s; try again later.\n"),
+                                Prog, spw_dbname ());
+                       fail_exit (1);
+               }
+               spw_locked = true;
        }
-       spw_locked = true;
        if (gr_lock () == 0) {
                fprintf (stderr,
                         _("%s: cannot lock %s; try again later.\n"),
@@ -629,13 +631,15 @@ static void open_files (void)
        }
        gr_locked = true;
 #ifdef SHADOWGRP
-       if (is_shadow_grp && (sgr_lock () == 0)) {
-               fprintf (stderr,
-                        _("%s: cannot lock %s; try again later.\n"),
-                        Prog, sgr_dbname ());
-               fail_exit (1);
+       if (is_shadow_grp) {
+               if (sgr_lock () == 0) {
+                       fprintf (stderr,
+                                _("%s: cannot lock %s; try again later.\n"),
+                                Prog, sgr_dbname ());
+                       fail_exit (1);
+               }
+               sgr_locked = true;
        }
-       sgr_locked = true;
 #endif
 
        if (pw_open (O_RDWR) == 0) {
@@ -749,6 +753,8 @@ int main (int argc, char **argv)
        (void) bindtextdomain (PACKAGE, LOCALEDIR);
        (void) textdomain (PACKAGE);
 
+       OPENLOG ("newusers");
+
        process_flags (argc, argv);
 
        check_perms ();