Really log the expiration date change as human readable strings instead of
integers.
This commit is contained in:
parent
fdae41eb63
commit
ae5db5d36b
@ -2,6 +2,8 @@
|
||||
|
||||
* src/usermod.c: Use a function to convert the dates from
|
||||
/etc/shadow to human readable dates.
|
||||
* src/usermod.c: Really log the expiration date change as human
|
||||
readable strings instead of integers.
|
||||
|
||||
2008-02-03 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
|
@ -468,23 +468,22 @@ static void new_spent (struct spwd *spent)
|
||||
spent->sp_inact = user_newinactive;
|
||||
}
|
||||
if (eflg) {
|
||||
/* XXX - dates might be better than numbers of days. --marekm */
|
||||
#ifdef WITH_AUDIT
|
||||
if (audit_fd >= 0) {
|
||||
/* log dates rather than numbers of days. */
|
||||
char new_exp[16], old_exp[16];
|
||||
date_to_str (new_exp, sizeof(16),
|
||||
user_newexpire * DAY, "never");
|
||||
date_to_str (old_exp, sizeof(16),
|
||||
user_expire * DAY, "never");
|
||||
|
||||
#ifdef WITH_AUDIT
|
||||
if (audit_fd >= 0) {
|
||||
audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
|
||||
"changing expiration date", user_newname,
|
||||
user_newid, 1);
|
||||
}
|
||||
#endif
|
||||
SYSLOG ((LOG_INFO,
|
||||
"change user `%s' expiration from `%ld' to `%ld'",
|
||||
spent->sp_namp, spent->sp_expire, user_newexpire));
|
||||
"change user `%s' expiration from `%s' to `%s'",
|
||||
spent->sp_namp, old_exp, new_exp));
|
||||
spent->sp_expire = user_newexpire;
|
||||
}
|
||||
spent->sp_pwdp = new_pw_passwd (spent->sp_pwdp);
|
||||
|
Loading…
Reference in New Issue
Block a user