9f13c6
Index: shadow-4.5/libmisc/getdate.y
9f13c6
===================================================================
9f13c6
--- shadow-4.5.orig/libmisc/getdate.y
9f13c6
+++ shadow-4.5/libmisc/getdate.y
9f13c6
@@ -152,6 +152,7 @@ static int	yyHaveDay;
9f13c6
 static int	yyHaveRel;
9f13c6
 static int	yyHaveTime;
9f13c6
 static int	yyHaveZone;
9f13c6
+static int      yyHaveYear;
9f13c6
 static int	yyTimezone;
9f13c6
 static int	yyDay;
9f13c6
 static int	yyHour;
9f13c6
@@ -293,18 +294,21 @@ date	: tUNUMBER '/' tUNUMBER {
9f13c6
 	      yyDay = $3;
9f13c6
 	      yyYear = $5;
9f13c6
 	    }
9f13c6
+	    yyHaveYear++;
9f13c6
 	}
9f13c6
 	| tUNUMBER tSNUMBER tSNUMBER {
9f13c6
 	    /* ISO 8601 format.  yyyy-mm-dd.  */
9f13c6
 	    yyYear = $1;
9f13c6
 	    yyMonth = -$2;
9f13c6
 	    yyDay = -$3;
9f13c6
+	    yyHaveYear++;
9f13c6
 	}
9f13c6
 	| tUNUMBER tMONTH tSNUMBER {
9f13c6
 	    /* e.g. 17-JUN-1992.  */
9f13c6
 	    yyDay = $1;
9f13c6
 	    yyMonth = $2;
9f13c6
 	    yyYear = -$3;
9f13c6
+	    yyHaveYear++;
9f13c6
 	}
9f13c6
 	| tMONTH tUNUMBER {
9f13c6
 	    yyMonth = $1;
9f13c6
@@ -314,6 +318,7 @@ date	: tUNUMBER '/' tUNUMBER {
9f13c6
 	    yyMonth = $1;
9f13c6
 	    yyDay = $2;
9f13c6
 	    yyYear = $4;
9f13c6
+	    yyHaveYear++;
9f13c6
 	}
9f13c6
 	| tUNUMBER tMONTH {
9f13c6
 	    yyMonth = $2;
9f13c6
@@ -323,6 +328,7 @@ date	: tUNUMBER '/' tUNUMBER {
9f13c6
 	    yyMonth = $2;
9f13c6
 	    yyDay = $1;
9f13c6
 	    yyYear = $3;
9f13c6
+	    yyHaveYear++;
9f13c6
 	}
9f13c6
 	;
9f13c6
 
9f13c6
@@ -395,7 +401,8 @@ relunit	: tUNUMBER tYEAR_UNIT {
9f13c6
 
9f13c6
 number	: tUNUMBER
9f13c6
           {
9f13c6
-	    if ((yyHaveTime != 0) && (yyHaveDate != 0) && (yyHaveRel == 0))
9f13c6
+	    if ((yyHaveTime != 0 || $1 >= 100) && !yyHaveYear
9f13c6
+		&& (yyHaveDate != 0) && (yyHaveRel == 0))
9f13c6
 	      yyYear = $1;
9f13c6
 	    else
9f13c6
 	      {
9f13c6
@@ -802,7 +809,7 @@ yylex (void)
9f13c6
 	  return LookupWord (buff);
9f13c6
 	}
9f13c6
       if (c != '(')
9f13c6
-	return *yyInput++;
9f13c6
+	return (unsigned char)*yyInput++;
9f13c6
       Count = 0;
9f13c6
       do
9f13c6
 	{