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
|
* src/usermod.c: Use a function to convert the dates from
|
||||||
/etc/shadow to human readable dates.
|
/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>
|
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;
|
spent->sp_inact = user_newinactive;
|
||||||
}
|
}
|
||||||
if (eflg) {
|
if (eflg) {
|
||||||
/* XXX - dates might be better than numbers of days. --marekm */
|
/* log dates rather than numbers of days. */
|
||||||
#ifdef WITH_AUDIT
|
|
||||||
if (audit_fd >= 0) {
|
|
||||||
char new_exp[16], old_exp[16];
|
char new_exp[16], old_exp[16];
|
||||||
date_to_str (new_exp, sizeof(16),
|
date_to_str (new_exp, sizeof(16),
|
||||||
user_newexpire * DAY, "never");
|
user_newexpire * DAY, "never");
|
||||||
date_to_str (old_exp, sizeof(16),
|
date_to_str (old_exp, sizeof(16),
|
||||||
user_expire * DAY, "never");
|
user_expire * DAY, "never");
|
||||||
|
#ifdef WITH_AUDIT
|
||||||
|
if (audit_fd >= 0) {
|
||||||
audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
|
audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
|
||||||
"changing expiration date", user_newname,
|
"changing expiration date", user_newname,
|
||||||
user_newid, 1);
|
user_newid, 1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO,
|
SYSLOG ((LOG_INFO,
|
||||||
"change user `%s' expiration from `%ld' to `%ld'",
|
"change user `%s' expiration from `%s' to `%s'",
|
||||||
spent->sp_namp, spent->sp_expire, user_newexpire));
|
spent->sp_namp, old_exp, new_exp));
|
||||||
spent->sp_expire = user_newexpire;
|
spent->sp_expire = user_newexpire;
|
||||||
}
|
}
|
||||||
spent->sp_pwdp = new_pw_passwd (spent->sp_pwdp);
|
spent->sp_pwdp = new_pw_passwd (spent->sp_pwdp);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user