From joes@joes.users.spiritone.com  Mon Jun  9 13:13:53 1997
Received: from ridge.spiritone.com (ridge.spiritone.com [205.139.108.2])
          by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id NAA12083
          for <FreeBSD-gnats-submit@freebsd.org>; Mon, 9 Jun 1997 13:13:52 -0700 (PDT)
Received: from joes.users.spiritone.com (joes.users.spiritone.com [205.139.111.224])
	by ridge.spiritone.com (8.8.5/8.8.5) with ESMTP id NAA16669
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 9 Jun 1997 13:13:20 -0700 (PDT)
Received: (from joes@localhost)
	by joes.users.spiritone.com (8.8.5/8.8.6.Beta4) id MAA11340;
	Mon, 9 Jun 1997 12:49:16 -0700 (PDT)
Message-Id: <199706091949.MAA11340@joes.users.spiritone.com>
Date: Mon, 9 Jun 1997 12:49:16 -0700 (PDT)
From: Joseph Stein <joes@spiritone.com>
Reply-To: joes@spiritone.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: passwordperiod != passwordtime in man (5) login.conf
X-Send-Pr-Version: 3.2

>Number:         3819
>Category:       docs
>Synopsis:       man (5) login.conf specifies passwordtime for password expiration
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    davidn
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun  9 13:20:01 PDT 1997
>Closed-Date:    Mon May 18 20:44:22 PDT 1998
>Last-Modified:  Mon May 18 20:49:13 PDT 1998
>Originator:     Joseph Stein
>Release:        FreeBSD 2.2-STABLE i386
>Organization:
>Environment:

FreeBSD joes.users.spiritone.com 2.2-STABLE FreeBSD 2.2-STABLE #0: Sun Jun  8 12:04:26 PDT 1997     joes@joes.users.spiritone.com:/usr/src/sys/compile/S_ISDN  i386

(binaries created just prior to this with a CVSup pull at 1900 hours  or so
on Sat 07 Jun 1997. and then make world.)

>Description:

While trying to figure out why passwords were not being set with the 
appropriate expiration date/time even though the appropriate lines in
/etc/login.conf and login.conf.db (made with cap_mkdb), I started digging
through the sources.   src/usr.bin/passwd/local_passwd.c specifies that
the password expiration is taken from the variable 'passwordperiod' and
not passwordtime, as is specified in the manual page.


>How-To-Repeat:

man 5 login.conf
grep password /usr/src/usr.bin/passwd/*c

>Fix:
	
change the specification to 'passwordperiod', or, change local_passwd to
look for 'passwordtime' instead.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->davidn 
Responsible-Changed-By: wosch 
Responsible-Changed-When: Sat Sep 13 10:54:39 PDT 1997 
Responsible-Changed-Why:  
David Nugent is the author of login classes. 

From: A Joseph Koshy <koshy@india.hp.com>
To: freebsd-gnats-submit@freebsd.org
Cc: phk@freebsd.org
Subject: Re: docs/3819: man (5) login.conf specifies passwordtime for password expiration
Date: Tue, 12 May 1998 13:14:38 +0530

 Here is a patch that makes "local_passwd.c" confirm to the documentation:
 
 # diff -u local_passwd.c-- local_passwd.c
 --- local_passwd.c--    Sat Mar  7 21:42:07 1998
 +++ local_passwd.c      Tue Sep 23 10:03:28 1997
 @@ -123,8 +123,8 @@
                 /* minpasswordlen capablity */
                 min_length = (int)login_getcapnum(lc, "minpasswordlen",
                                 min_length, min_length);
 -               /* passwordperiod capability */
 -               period = login_getcaptime(lc, "passwordperiod", 0, 0);
 +               /* passwordtime capability */
 +               period = login_getcaptime(lc, "passwordtime", 0, 0);
                 if (period > (time_t)0) {
                         pw->pw_change = time(NULL) + period;
                 }
 @@ -207,7 +207,7 @@
          * Get the new password.  Reset passwd change time to zero by
          * default. If the user has a valid login class (or the default
          * fallback exists), then the next password change date is set
 -        * by getnewpasswd() according to the "passwordperiod" capability
 +        * by getnewpasswd() according to the "passwordtime" capability
          * if one has been specified.
          */
         pw->pw_change = 0;
 
 
 Note: the other time related capabilities (like warntime) don't seem to
 be being used.
 
 Koshy
 <koshy@india.hp.com>		My Personal Opinions Only
State-Changed-From-To: open->closed 
State-Changed-By: jkoshy 
State-Changed-When: Mon May 18 20:44:22 PDT 1998 
State-Changed-Why:  
Changed in rev1.20 of "local_passwd.c".  Thanks. 
>Unformatted:
