* 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).
This commit is contained in:
parent
cfeacc4d67
commit
c9119dc6bb
@ -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>
|
2008-08-20 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
* NEWS, src/gpasswd.c: Use getopt_long instead of getopt. Added
|
* NEWS, src/gpasswd.c: Use getopt_long instead of getopt. Added
|
||||||
|
@ -614,13 +614,15 @@ static void open_files (void)
|
|||||||
fail_exit (1);
|
fail_exit (1);
|
||||||
}
|
}
|
||||||
pw_locked = true;
|
pw_locked = true;
|
||||||
if (is_shadow && (spw_lock () == 0)) {
|
if (is_shadow) {
|
||||||
fprintf (stderr,
|
if (spw_lock () == 0) {
|
||||||
_("%s: cannot lock %s; try again later.\n"),
|
fprintf (stderr,
|
||||||
Prog, spw_dbname ());
|
_("%s: cannot lock %s; try again later.\n"),
|
||||||
fail_exit (1);
|
Prog, spw_dbname ());
|
||||||
|
fail_exit (1);
|
||||||
|
}
|
||||||
|
spw_locked = true;
|
||||||
}
|
}
|
||||||
spw_locked = true;
|
|
||||||
if (gr_lock () == 0) {
|
if (gr_lock () == 0) {
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("%s: cannot lock %s; try again later.\n"),
|
_("%s: cannot lock %s; try again later.\n"),
|
||||||
@ -629,13 +631,15 @@ static void open_files (void)
|
|||||||
}
|
}
|
||||||
gr_locked = true;
|
gr_locked = true;
|
||||||
#ifdef SHADOWGRP
|
#ifdef SHADOWGRP
|
||||||
if (is_shadow_grp && (sgr_lock () == 0)) {
|
if (is_shadow_grp) {
|
||||||
fprintf (stderr,
|
if (sgr_lock () == 0) {
|
||||||
_("%s: cannot lock %s; try again later.\n"),
|
fprintf (stderr,
|
||||||
Prog, sgr_dbname ());
|
_("%s: cannot lock %s; try again later.\n"),
|
||||||
fail_exit (1);
|
Prog, sgr_dbname ());
|
||||||
|
fail_exit (1);
|
||||||
|
}
|
||||||
|
sgr_locked = true;
|
||||||
}
|
}
|
||||||
sgr_locked = true;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (pw_open (O_RDWR) == 0) {
|
if (pw_open (O_RDWR) == 0) {
|
||||||
@ -749,6 +753,8 @@ int main (int argc, char **argv)
|
|||||||
(void) bindtextdomain (PACKAGE, LOCALEDIR);
|
(void) bindtextdomain (PACKAGE, LOCALEDIR);
|
||||||
(void) textdomain (PACKAGE);
|
(void) textdomain (PACKAGE);
|
||||||
|
|
||||||
|
OPENLOG ("newusers");
|
||||||
|
|
||||||
process_flags (argc, argv);
|
process_flags (argc, argv);
|
||||||
|
|
||||||
check_perms ();
|
check_perms ();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user