[BACK]Return to login.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / login

Diff for /src/usr.bin/login/login.c between version 1.32 and 1.33

version 1.32, 2000/08/24 20:08:06 version 1.33, 2000/09/04 19:15:27
Line 427 
Line 427 
   
         if (pwd->pw_change || pwd->pw_expire)          if (pwd->pw_change || pwd->pw_expire)
                 (void)gettimeofday(&tp, (struct timezone *)NULL);                  (void)gettimeofday(&tp, (struct timezone *)NULL);
         if (pwd->pw_change) {  
                 if (tp.tv_sec >= pwd->pw_change) {  
                         (void)printf("Sorry -- your password has expired.\n");  
                         sleepexit(1);  
                 } else if (!quietlog && pwd->pw_change - tp.tv_sec <  
                     login_getcaptime(lc, "password-warn",  
                     2 * DAYSPERWEEK * SECSPERDAY, 2 * DAYSPERWEEK * SECSPERDAY))  
                         (void)printf("Warning: your password expires on %s",  
                             ctime(&pwd->pw_change));  
         }  
         if (pwd->pw_expire) {          if (pwd->pw_expire) {
                 if (tp.tv_sec >= pwd->pw_expire) {                  if (tp.tv_sec >= pwd->pw_expire) {
                         (void)printf("Sorry -- your account has expired.\n");                          (void)printf("Sorry -- your account has expired.\n");
Line 446 
Line 436 
                     2 * DAYSPERWEEK * SECSPERDAY, 2 * DAYSPERWEEK * SECSPERDAY))                      2 * DAYSPERWEEK * SECSPERDAY, 2 * DAYSPERWEEK * SECSPERDAY))
                         (void)printf("Warning: your account expires on %s",                          (void)printf("Warning: your account expires on %s",
                             ctime(&pwd->pw_expire));                              ctime(&pwd->pw_expire));
           }
           if (pwd->pw_change) {
                   if (tp.tv_sec >= pwd->pw_change) {
                           (void)printf("Sorry -- your password has expired.\n");
                           sleepexit(1);
                   } else if (!quietlog && pwd->pw_change - tp.tv_sec <
                       login_getcaptime(lc, "password-warn",
                       2 * DAYSPERWEEK * SECSPERDAY, 2 * DAYSPERWEEK * SECSPERDAY))
                           (void)printf("Warning: your password expires on %s",
                               ctime(&pwd->pw_change));
         }          }
   
         /* Nothing else left to fail -- really log in. */          /* Nothing else left to fail -- really log in. */

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.33