* src/chage.c, src/chgpasswd.c, src/chpasswd.c, src/chsh.c,
src/gpasswd.c, src/groupadd.c, src/groupdel.c, src/groupmems.c, src/groupmod.c, src/grpck.c, src/grpconv.c, src/grpunconv.c, src/newusers.c, src/passwd.c, src/pwck.c, src/pwconv.c, src/pwunconv.c, src/useradd.c, src/userdel.c, src/usermod.c: In case of a lock failure, indicate to the user that she can try again later. Do not log to syslog.
This commit is contained in:
+4
-8
@@ -197,21 +197,17 @@ static void open_files (void)
|
||||
*/
|
||||
if (!read_only) {
|
||||
if (pw_lock () == 0) {
|
||||
fprintf (stderr, _("%s: cannot lock %s\n"),
|
||||
fprintf (stderr,
|
||||
_("%s: cannot lock %s; try again later.\n"),
|
||||
Prog, pwd_file);
|
||||
if (use_system_pw_file) {
|
||||
SYSLOG ((LOG_WARN, "cannot lock %s", pwd_file));
|
||||
}
|
||||
fail_exit (E_CANTLOCK);
|
||||
}
|
||||
pw_locked = true;
|
||||
if (is_shadow) {
|
||||
if (spw_lock () == 0) {
|
||||
fprintf (stderr, _("%s: cannot lock %s\n"),
|
||||
fprintf (stderr,
|
||||
_("%s: cannot lock %s; try again later.\n"),
|
||||
Prog, spw_file);
|
||||
if (use_system_spw_file) {
|
||||
SYSLOG ((LOG_WARN, "cannot lock %s", spw_file));
|
||||
}
|
||||
fail_exit (E_CANTLOCK);
|
||||
}
|
||||
spw_locked = true;
|
||||
|
||||
Reference in New Issue
Block a user