* 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:
@ -92,6 +92,8 @@ int main (int argc, char **argv)
|
||||
(void) bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
(void) textdomain (PACKAGE);
|
||||
|
||||
OPENLOG ("grpunconv");
|
||||
|
||||
if (sgr_file_present () == 0) {
|
||||
exit (0); /* no /etc/gshadow, nothing to do */
|
||||
}
|
||||
@ -147,6 +149,7 @@ int main (int argc, char **argv)
|
||||
fprintf (stderr,
|
||||
_("%s: failure while writing changes to %s\n"),
|
||||
Prog, sgr_dbname ());
|
||||
SYSLOG ((LOG_ERR, "failure while writing changes to %s", sgr_dbname ()));
|
||||
fail_exit (3);
|
||||
}
|
||||
|
||||
@ -154,6 +157,7 @@ int main (int argc, char **argv)
|
||||
fprintf (stderr,
|
||||
_("%s: failure while writing changes to %s\n"),
|
||||
Prog, gr_dbname ());
|
||||
SYSLOG ((LOG_ERR, "failure while writing changes to %s", gr_dbname ()));
|
||||
fail_exit (3);
|
||||
}
|
||||
|
||||
@ -161,6 +165,7 @@ int main (int argc, char **argv)
|
||||
fprintf (stderr,
|
||||
_("%s: cannot delete %s\n"),
|
||||
Prog, SGROUP_FILE);
|
||||
SYSLOG ((LOG_ERR, "cannot delete %s", SGROUP_FILE));
|
||||
fail_exit (3);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user