🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Steven M. Schultz Sun, 22 Jul 1990 22:31
password expiration is incorrect (+FIX)
#68
Author: Steven M. Schultz
Date: Sun, 22 Jul 1990 22:31
51 lines
2657 bytes
	In the verson of login.c which implements the password
	aging there is a bug in the notification of a soon to
	expire password or account.

	The test for an account or password expiring in less than 
	two weeks is reversed, causing the reminder that the password
	or account will expire in the future to always be given rather
	than waiting until the expiration is within two weeks or less.

	The test for the current time being greater than or
	equal to the expiration time having already been done,
	the order of subtraction should be reversed in the test
	which follows.

*** login.c.old	Tue Sep 19 17:58:41 1989
--- login.c	Sun Jul 22 18:23:46 1990
***************
*** 344,350 ****
  			(void)printf("Sorry -- your password has expired.\n");
  			sleepexit(1);
  		}
! 		else if (tp.tv_sec - pwd->pw_change < TWOWEEKS && !quietlog) {
  			ttp = localtime(&pwd->pw_change);
  			(void)printf("Warning: your password expires on %s %d, %d\n",
  			    months[ttp->tm_mon], ttp->tm_mday, TM_YEAR_BASE + ttp->tm_year);
--- 344,350 ----
  			(void)printf("Sorry -- your password has expired.\n");
  			sleepexit(1);
  		}
! 		else if (pwd->pw_change - tp.tv_sec < TWOWEEKS && !quietlog) {
  			ttp = localtime(&pwd->pw_change);
  			(void)printf("Warning: your password expires on %s %d, %d\n",
  			    months[ttp->tm_mon], ttp->tm_mday, TM_YEAR_BASE + ttp->tm_year);
***************
*** 354,360 ****
  			(void)printf("Sorry -- your account has expired.\n");
  			sleepexit(1);
  		}
! 		else if (tp.tv_sec - pwd->pw_expire < TWOWEEKS && !quietlog) {
  			ttp = localtime(&pwd->pw_expire);
  			(void)printf("Warning: your account expires on %s %d, %d\n",
  			    months[ttp->tm_mon], ttp->tm_mday, TM_YEAR_BASE + ttp->tm_year);
--- 354,360 ----
  			(void)printf("Sorry -- your account has expired.\n");
  			sleepexit(1);
  		}
! 		else if (pwd->pw_expire - tp.tv_sec < TWOWEEKS && !quietlog) {
  			ttp = localtime(&pwd->pw_expire);
  			(void)printf("Warning: your account expires on %s %d, %d\n",
  			    months[ttp->tm_mon], ttp->tm_mday, TM_YEAR_BASE + ttp->tm_year);
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads