[Pkg-shadow-commits] r1766 - in upstream/trunk: . src
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Sun Feb 3 21:37:45 UTC 2008
Author: nekral-guest
Date: 2008-02-03 21:37:45 +0000 (Sun, 03 Feb 2008)
New Revision: 1766
Modified:
upstream/trunk/ChangeLog
upstream/trunk/src/usermod.c
Log:
Really log the expiration date change as human readable strings instead of
integers.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2008-02-03 21:30:47 UTC (rev 1765)
+++ upstream/trunk/ChangeLog 2008-02-03 21:37:45 UTC (rev 1766)
@@ -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 at centraliens.net>
Modified: upstream/trunk/src/usermod.c
===================================================================
--- upstream/trunk/src/usermod.c 2008-02-03 21:30:47 UTC (rev 1765)
+++ upstream/trunk/src/usermod.c 2008-02-03 21:37:45 UTC (rev 1766)
@@ -468,23 +468,22 @@
spent->sp_inact = user_newinactive;
}
if (eflg) {
- /* XXX - dates might be better than numbers of days. --marekm */
+ /* 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) {
- 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");
-
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);
More information about the Pkg-shadow-commits
mailing list