* src/chage.c, src/chfn.c, src/chgpasswd.c, src/chpasswd.c,
src/chsh.c, src/groupadd.c, src/groupdel.c, src/groupmems.c, src/groupmod.c, src/newusers.c, src/useradd.c, src/userdel.c, src/usermod.c: Provide the PAM error message instead of our own, and log error to syslog. * src/groupmems.c: Exit with exit rather than fail_exit in usage(). * src/newusers.c: Check the number of arguments. * src/newusers.c: Do not create the home directory when it is not changed. * src/useradd.c: Set the group password to "!" rather "x" if there are no gshadow file.
This commit is contained in:
@ -784,13 +784,16 @@ int main (int argc, char **argv)
|
||||
retval = pam_acct_mgmt (pamh, 0);
|
||||
}
|
||||
|
||||
if (NULL != pamh) {
|
||||
(void) pam_end (pamh, retval);
|
||||
}
|
||||
if (PAM_SUCCESS != retval) {
|
||||
fprintf (stderr, _("%s: PAM authentication failed\n"), Prog);
|
||||
fprintf (stderr, _("%s: PAM: %s\n"),
|
||||
Prog, pam_strerror (pamh, retval));
|
||||
SYSLOG((LOG_ERR, "%s", pam_strerror (pamh, retval)));
|
||||
if (NULL != pamh) {
|
||||
(void) pam_end (pamh, retval);
|
||||
}
|
||||
exit (1);
|
||||
}
|
||||
(void) pam_end (pamh, retval);
|
||||
#endif /* USE_PAM */
|
||||
#endif /* ACCT_TOOLS_SETUID */
|
||||
|
||||
|
Reference in New Issue
Block a user