* src/chfn.c: Do not exit on pw_unlock failures.

* src/grpconv.c, src/grpunconv.c, src/pwconv.c, src/pwunconv.c,
	src/vipw.c: Open syslog with the right identification name.
	* src/vipw.c: Log unlock errors to syslog.
	* src/vipw.c: Log edits to syslog.
	* src/chage.c, src/chfn.c, src/chsh.c, src/gpasswd.c,
	src/groupadd.c, src/groupdel.c, src/groupmod.c, src/grpconv.c,
	src/grpunconv.c, src/passwd.c, src/pwck.c, src/pwunconv.c,
	src/useradd.c, src/usermod.c: Harmonize the syslog levels. Failure
	to close or unlock are errors. Failure to open files are warnings.
This commit is contained in:
nekral-guest
2008-08-22 02:30:33 +00:00
parent c9119dc6bb
commit a3be8ff055
17 changed files with 93 additions and 59 deletions

View File

@@ -370,7 +370,7 @@ static void update_shell (const char *user, char *newshell)
pw_locked = true;
if (pw_open (O_RDWR) == 0) {
fprintf (stderr, _("%s: cannot open %s\n"), Prog, pw_dbname ());
SYSLOG ((LOG_ERR, "cannot open %s", pw_dbname ()));
SYSLOG ((LOG_WARN, "cannot open %s", pw_dbname ()));
fail_exit (1);
}
@@ -400,7 +400,7 @@ static void update_shell (const char *user, char *newshell)
* that entry as well.
*/
if (pw_update (&pwent) == 0) {
SYSLOG ((LOG_ERR, "error updating passwd entry"));
SYSLOG ((LOG_WARN, "error updating passwd entry"));
fputs (_("Error updating the password entry.\n"), stderr);
fail_exit (1);
}