[Pkg-shadow-commits] r2584 - in upstream/trunk: . libmisc

Nicolas FRANCOIS nekral-guest at alioth.debian.org
Sun Apr 5 21:22:53 UTC 2009


Author: nekral-guest
Date: 2009-04-05 21:22:53 +0000 (Sun, 05 Apr 2009)
New Revision: 2584

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/libmisc/age.c
Log:
	* libmisc/age.c: Return a specific message when sp_lstchg is null.

Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2009-03-22 12:32:40 UTC (rev 2583)
+++ upstream/trunk/ChangeLog	2009-04-05 21:22:53 UTC (rev 2584)
@@ -1,3 +1,7 @@
+2009-04-04  Nicolas François  <nicolas.francois at centraliens.net>
+
+	* libmisc/age.c: Return a specific message when sp_lstchg is null.
+
 2009-03-21  Nicolas François  <nicolas.francois at centraliens.net>
 
 	* lib/sgetpwent.c, lib/sgetgrent.c: Use get_uid and get_gid to

Modified: upstream/trunk/libmisc/age.c
===================================================================
--- upstream/trunk/libmisc/age.c	2009-03-22 12:32:40 UTC (rev 2583)
+++ upstream/trunk/libmisc/age.c	2009-04-05 21:22:53 UTC (rev 2584)
@@ -174,6 +174,12 @@
 	    || (-1 == sp->sp_warn)) {
 		return;
 	}
+
+	if (0 == sp->sp_lstchg) {
+		(void) puts (_("You must change your password."));
+		return;
+	}
+
 	remain = sp->sp_lstchg + sp->sp_max - now;
 	if (remain <= sp->sp_warn) {
 		remain /= DAY / SCALE;




More information about the Pkg-shadow-commits mailing list