[Pkg-shadow-commits] r2281 - in upstream/trunk: . src
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Fri Aug 22 02:29:32 UTC 2008
Author: nekral-guest
Date: 2008-08-22 02:29:31 +0000 (Fri, 22 Aug 2008)
New Revision: 2281
Modified:
upstream/trunk/ChangeLog
upstream/trunk/src/newusers.c
Log:
* 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).
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2008-08-22 02:28:15 UTC (rev 2280)
+++ upstream/trunk/ChangeLog 2008-08-22 02:29:31 UTC (rev 2281)
@@ -1,5 +1,11 @@
2008-08-20 Nicolas François <nicolas.francois at 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 at centraliens.net>
+
* NEWS, src/gpasswd.c: Use getopt_long instead of getopt. Added
support for long options --add (-a), --delete (-d),
--remove-password (-r), --restrict (-R), --administrators (-A),
Modified: upstream/trunk/src/newusers.c
===================================================================
--- upstream/trunk/src/newusers.c 2008-08-22 02:28:15 UTC (rev 2280)
+++ upstream/trunk/src/newusers.c 2008-08-22 02:29:31 UTC (rev 2281)
@@ -614,13 +614,15 @@
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 @@
}
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 @@
(void) bindtextdomain (PACKAGE, LOCALEDIR);
(void) textdomain (PACKAGE);
+ OPENLOG ("newusers");
+
process_flags (argc, argv);
check_perms ();
More information about the Pkg-shadow-commits
mailing list