diff options
Diffstat (limited to 'usr.bin/chpass')
-rw-r--r-- | usr.bin/chpass/Makefile | 1 | ||||
-rw-r--r-- | usr.bin/chpass/chpass.1 | 59 | ||||
-rw-r--r-- | usr.bin/chpass/chpass.c | 12 | ||||
-rw-r--r-- | usr.bin/chpass/edit.c | 4 | ||||
-rw-r--r-- | usr.bin/chpass/field.c | 2 | ||||
-rw-r--r-- | usr.bin/chpass/pw_copy.c | 4 | ||||
-rw-r--r-- | usr.bin/chpass/pw_yp.c | 4 | ||||
-rw-r--r-- | usr.bin/chpass/table.c | 2 | ||||
-rw-r--r-- | usr.bin/chpass/util.c | 9 |
9 files changed, 44 insertions, 53 deletions
diff --git a/usr.bin/chpass/Makefile b/usr.bin/chpass/Makefile index 3abed829d3ac..f19a25730d1f 100644 --- a/usr.bin/chpass/Makefile +++ b/usr.bin/chpass/Makefile @@ -1,7 +1,6 @@ # @(#)Makefile 8.2 (Berkeley) 4/2/94 PROG= chpass -CFLAGS+=-Wall SRCS= chpass.c edit.c field.c pw_copy.c pw_scan.c pw_util.c pw_yp.c \ table.c util.c ypxfr_misc.c ${GENSRCS} GENSRCS=yp.h yp_clnt.c yppasswd.h yppasswd_clnt.c yppasswd_private.h \ diff --git a/usr.bin/chpass/chpass.1 b/usr.bin/chpass/chpass.1 index 8bcd8c826358..c810f9bffcad 100644 --- a/usr.bin/chpass/chpass.1 +++ b/usr.bin/chpass/chpass.1 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)chpass.1 8.2 (Berkeley) 12/30/93 -.\" $Id: chpass.1,v 1.13 1998/12/13 02:48:43 dillon Exp $ +.\" $Id: chpass.1,v 1.7.2.4 1998/08/14 03:38:01 thepish Exp $ .\" .Dd December 30, 1993 .Dt CHPASS 1 @@ -88,30 +88,26 @@ user's encrypted password user's login .It Gid: user's login group -.It Class: -user's general classification .It Change: password change time .It Expire: account expiration time +.It Class: +user's general classification +.It Home Directory: +user's home directory +.It Shell: +user's login shell .It Full Name: user's real name .It Location: -user's normal location (1) +user's normal location .It Home Phone: -user's home phone (1) +user's home phone .It Office Phone: -user's office phone (1) +user's office phone .It Other Information: -any locally defined parameters for user (1) -.It Home Directory: -user's home directory -.It Shell: -user's login shell -.Pp -.It NOTE(1) - -In the actual master.passwd file, these fields are comma-delimited -fields embedded in the FullName field. +any locally defined parameters for user .El .Pp The @@ -145,13 +141,6 @@ This field may be filled in with either a number or a group name (see .Xr group 5 ) . .Pp The -.Ar class -field references class descriptions in -.Ar /etc/login.conf -and is typically used to initialize the user's system resource limits -when they login. -.Pp -The .Ar change field is the date by which the password must be changed. .Pp @@ -171,15 +160,12 @@ is the day of the month, and .Ar year is the year. .Pp -Five fields are available for storing the user's -.Ar full name , office location , -.Ar work -and -.Ar home telephone -numbers and finally -.Ar other information -which is a single comma delimited string to represent any additional -gcos fields (typically used for site specific user information). +The +.Ar class +field is currently unused. In the near future it will be a key to +a +.Xr termcap 5 +style database of user attributes. .Pp The user's .Ar home directory @@ -200,6 +186,16 @@ shell. Non-standard is defined as a shell not found in .Pa /etc/shells . .Pp +The last five fields are for storing the user's +.Ar full name , office location , +.Ar work +and +.Ar home telephone +numbers and finally +.Ar other information +which is a single comma delimited string to represent any additional +gcos fields (typically used for site specific user information). +.Pp Once the information has been verified, .Nm chpass uses @@ -402,7 +398,6 @@ The list of approved shells .Xr login 1 , .Xr passwd 1 , .Xr getusershell 3 , -.Xr login.conf 5, .Xr passwd 5 , .Xr pwd_mkdb 8 , .Xr vipw 8 diff --git a/usr.bin/chpass/chpass.c b/usr.bin/chpass/chpass.c index 2809f8bef74f..982548fa5a46 100644 --- a/usr.bin/chpass/chpass.c +++ b/usr.bin/chpass/chpass.c @@ -32,15 +32,15 @@ */ #ifndef lint -static const char copyright[] = +static char copyright[] = "@(#) Copyright (c) 1988, 1993, 1994\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static const char sccsid[] = "From: @(#)chpass.c 8.4 (Berkeley) 4/2/94"; -static const char rcsid[] = - "$Id: chpass.c,v 1.14 1997/03/29 04:28:38 imp Exp $"; +static char sccsid[] = "From: @(#)chpass.c 8.4 (Berkeley) 4/2/94"; +static char rcsid[] = + "$Id: chpass.c,v 1.13 1997/02/22 19:54:25 peter Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -83,10 +83,10 @@ main(argc, argv) char **argv; { enum { NEWSH, LOADENTRY, EDITENTRY, NEWPW, NEWEXP } op; - struct passwd *pw = NULL, lpw; + struct passwd *pw, lpw; char *username = NULL; int ch, pfd, tfd; - char *arg = NULL; + char *arg; #ifdef YP int force_local = 0; int force_yp = 0; diff --git a/usr.bin/chpass/edit.c b/usr.bin/chpass/edit.c index 9cae42e753fc..68dbc0ea50e3 100644 --- a/usr.bin/chpass/edit.c +++ b/usr.bin/chpass/edit.c @@ -30,11 +30,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: edit.c,v 1.11 1998/08/14 03:18:32 thepish Exp $ + * $Id: edit.c,v 1.10 1997/06/25 06:59:55 charnier Exp $ */ #ifndef lint -static const char sccsid[] = "@(#)edit.c 8.3 (Berkeley) 4/2/94"; +static char sccsid[] = "@(#)edit.c 8.3 (Berkeley) 4/2/94"; #endif /* not lint */ #include <sys/param.h> diff --git a/usr.bin/chpass/field.c b/usr.bin/chpass/field.c index 997d21feed30..73fa4795a2e0 100644 --- a/usr.bin/chpass/field.c +++ b/usr.bin/chpass/field.c @@ -32,7 +32,7 @@ */ #ifndef lint -static const char sccsid[] = "@(#)field.c 8.4 (Berkeley) 4/2/94"; +static char sccsid[] = "@(#)field.c 8.4 (Berkeley) 4/2/94"; #endif /* not lint */ #include <sys/param.h> diff --git a/usr.bin/chpass/pw_copy.c b/usr.bin/chpass/pw_copy.c index d60f75177492..73e2da22115c 100644 --- a/usr.bin/chpass/pw_copy.c +++ b/usr.bin/chpass/pw_copy.c @@ -66,8 +66,8 @@ pw_copy(ffd, tfd, pw) snprintf(uidstr, sizeof(uidstr), "%d", pw->pw_uid); snprintf(gidstr, sizeof(gidstr), "%d", pw->pw_gid); - snprintf(chgstr, sizeof(chgstr), "%ld", (long)pw->pw_change); - snprintf(expstr, sizeof(expstr), "%ld", (long)pw->pw_expire); + snprintf(chgstr, sizeof(chgstr), "%ld", pw->pw_change); + snprintf(expstr, sizeof(expstr), "%ld", pw->pw_expire); if (!(from = fdopen(ffd, "r"))) pw_error(_PATH_MASTERPASSWD, 1, 1); diff --git a/usr.bin/chpass/pw_yp.c b/usr.bin/chpass/pw_yp.c index 57542704392a..777ec54d4633 100644 --- a/usr.bin/chpass/pw_yp.c +++ b/usr.bin/chpass/pw_yp.c @@ -35,7 +35,7 @@ * Center for Telecommunications Research * Columbia University, New York City * - * $Id: pw_yp.c,v 1.12 1997/12/18 15:27:43 bde Exp $ + * $Id: pw_yp.c,v 1.11 1997/07/29 15:45:36 wpaul Exp $ */ #ifdef YP @@ -254,7 +254,7 @@ int use_yp (user, uid, which) char ubuf[UT_NAMESIZE + 2]; if (which) { - snprintf(ubuf, sizeof(ubuf), "%lu", (unsigned long)uid); + snprintf(ubuf, sizeof(ubuf), "%lu", uid); user = (char *)&ubuf; } diff --git a/usr.bin/chpass/table.c b/usr.bin/chpass/table.c index 1bc857b87ca8..eed097eebad8 100644 --- a/usr.bin/chpass/table.c +++ b/usr.bin/chpass/table.c @@ -32,7 +32,7 @@ */ #ifndef lint -static const char sccsid[] = "@(#)table.c 8.3 (Berkeley) 4/2/94"; +static char sccsid[] = "@(#)table.c 8.3 (Berkeley) 4/2/94"; #endif /* not lint */ #include <sys/types.h> diff --git a/usr.bin/chpass/util.c b/usr.bin/chpass/util.c index d8917f51bc96..132c1514f99a 100644 --- a/usr.bin/chpass/util.c +++ b/usr.bin/chpass/util.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)util.c 8.4 (Berkeley) 4/2/94"; #endif static const char rcsid[] = - "$Id: util.c,v 1.6 1998/03/23 07:41:49 charnier Exp $"; + "$Id$"; #endif /* not lint */ #include <sys/types.h> @@ -115,12 +115,9 @@ atot(p, store) year = atoi(t); if (day < 1 || day > 31 || month < 1 || month > 12 || !year) goto bad; - /* Allow two digit years 1969-2068 */ - if (year < 69) - year += 2000; - else if (year < 100) + if (year < 100) year += 1900; - if (year < 1969) + if (year <= 1970) bad: return (1); lt->tm_year = year - 1900; lt->tm_mon = month - 1; |