+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
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"),
}
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) {
(void) bindtextdomain (PACKAGE, LOCALEDIR);
(void) textdomain (PACKAGE);
+ OPENLOG ("newusers");
+
process_flags (argc, argv);
check_perms ();