0.76: please submit patches for this section with actual code/doc
patches!
+* pam_unix: more from Nalin log password changes (Bug 517743 - agmorgan)
* pam_limits: make it use the priority value specified in config
(bug 530428 - baggins)
* pam_unix: removed broken code in password update code. Report from
}
}
-static int _update_passwd(const char *forwho, const char *towhat)
+static int _update_passwd(pam_handle_t *pamh,
+ const char *forwho, const char *towhat)
{
struct passwd *tmpent = NULL;
FILE *pwfile, *opwfile;
if (!err) {
rename(PW_TMPFILE, "/etc/passwd");
+ _log_err(LOG_NOTICE, pamh, "password changed for %s", forwho);
return PAM_SUCCESS;
} else {
unlink(PW_TMPFILE);
}
D(("The password has%s been changed on %s.",
(err || status) ? " not" : "", master));
+ _log_err(LOG_NOTICE, pamh, "password%s changed for %s on %s",
+ (err || status) ? " not" : "", pwd->pw_name, master);
auth_destroy(clnt->cl_auth);
clnt_destroy(clnt);
if (on(UNIX_SHADOW, ctrl) || (strcmp(pwd->pw_passwd, "x") == 0)) {
retval = _update_shadow(forwho, towhat);
if (retval == PAM_SUCCESS)
- retval = _update_passwd(forwho, "x");
+ retval = _update_passwd(pamh, forwho, "x");
} else {
- retval = _update_passwd(forwho, towhat);
+ retval = _update_passwd(pamh, forwho, towhat);
}
return retval;