*BSD News Article 17003


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!swrinde!cs.utexas.edu!natinst.com!hrd769.brooks.af.mil!not-for-mail
From: burgess@hrd769.brooks.af.mil (Dave Burgess)
Newsgroups: comp.os.386bsd.bugs
Subject: login.c.patch
Date: 7 Jun 1993 16:51:19 -0500
Organization: Armstrong Lab MIS, Brooks AFB TX
Lines: 34
Message-ID: <1v0d95INN5po@hrd769.brooks.af.mil>
NNTP-Posting-Host: hrd769.brooks.af.mil

If any of you have tried to use passwd expiration, you have probably
seen this problem.  The account expire date is used to notify the user
when their passwd is about to (or already has) expire.  This has been a
mistake from the early days, and I suspect it is a mistake clear back to
the net-2 tape.

*** login.c.orig	Mon Jun  7 16:45:08 1993
--- login.c	Mon Jun  7 16:46:03 1993
***************
*** 320,326 ****
  		} else if (pwd->pw_change - tp.tv_sec <
  		    2 * DAYSPERWEEK * SECSPERDAY && !quietlog)
  			(void)printf("Warning: your password expires on %s",
! 			    ctime(&pwd->pw_expire));
  	if (pwd->pw_expire)
  		if (tp.tv_sec >= pwd->pw_expire) {
  			(void)printf("Sorry -- your account has expired.\n");
--- 320,326 ----
  		} else if (pwd->pw_change - tp.tv_sec <
  		    2 * DAYSPERWEEK * SECSPERDAY && !quietlog)
  			(void)printf("Warning: your password expires on %s",
! 			    ctime(&pwd->pw_change));
  	if (pwd->pw_expire)
  		if (tp.tv_sec >= pwd->pw_expire) {
  			(void)printf("Sorry -- your account has expired.\n");

With this change in place, password expiration works almost the way it
should. :-)
  			
-- 
------
TSgt Dave Burgess
NCOIC AL/Management Information Systems Office
Brooks AFB, TX