Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Jun 1997 13:20:54 -0700 (PDT)
From:      Joseph Stein <joes@spiritone.com>
To:        FreeBSD-gnats-submit@FreeBSD.ORG, joes@joes.users.spiritone.com
Subject:   bin/3820: login_cap.c (libutil) doesn't recognize [Yy][Ww] for years/weeks
Message-ID:  <199706092020.NAA11811@joes.users.spiritone.com>
Resent-Message-ID: <199706092050.NAA14076@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         3820
>Category:       bin
>Synopsis:       login_cap.c (libutil) doesn't recognize [Yy][Ww] for years/weeks
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun  9 13:50:01 PDT 1997
>Last-Modified:
>Originator:     Joseph Stein
>Organization:
>Release:        FreeBSD 2.2-STABLE i386
>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

Sources CVSup'd Jun 7 circa 19:00 hrs.

>Description:


The login capabilities database returns the following error:
Jun  9 12:53:00 joes passwd: login_getcaptime: class 'subshell' bad value passwordperiod=4w

when passwords are changed.  man 5 login.conf specifies that you should be
able to specify weeks with [w] and years with [y]; login_cap.c specifies
that you can use either [Ww] or [Yy] safely (at least right now :)

>How-To-Repeat:

Make your login.conf database have a 'passwordperiod' equal to a certain
number of days, or years.  (passwordperiod=4w).
Change your password.
You'll get the above error message (and your password will not expire).

>Fix:

The code that scans for the 'y' or 'w' falls through to the next case because
it is lacking break; statements.
(Is that intentional?)

Index: src/lib/libutil/login_cap.c
===================================================================
RCS file: /usr/cvs/src/lib/libutil/login_cap.c,v
retrieving revision 1.12.2.1
diff -r1.12.2.1 login_cap.c
559a560
> 	    break;
561a563
> 	    break;

>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706092020.NAA11811>