[Midnightbsd-cvs] src [11579] trunk/usr.bin/chpass: sync with freebsd.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Jul 8 11:38:12 EDT 2018


Revision: 11579
          http://svnweb.midnightbsd.org/src/?rev=11579
Author:   laffer1
Date:     2018-07-08 11:38:12 -0400 (Sun, 08 Jul 2018)
Log Message:
-----------
sync with freebsd.

Modified Paths:
--------------
    trunk/usr.bin/chpass/Makefile
    trunk/usr.bin/chpass/chpass.1
    trunk/usr.bin/chpass/chpass.c
    trunk/usr.bin/chpass/chpass.h
    trunk/usr.bin/chpass/edit.c
    trunk/usr.bin/chpass/field.c
    trunk/usr.bin/chpass/table.c
    trunk/usr.bin/chpass/util.c

Property Changed:
----------------
    trunk/usr.bin/chpass/chpass.1

Modified: trunk/usr.bin/chpass/Makefile
===================================================================
--- trunk/usr.bin/chpass/Makefile	2018-07-08 15:36:37 UTC (rev 11578)
+++ trunk/usr.bin/chpass/Makefile	2018-07-08 15:38:12 UTC (rev 11579)
@@ -1,5 +1,6 @@
+# $MidnightBSD$
 #	@(#)Makefile	8.2 (Berkeley) 4/2/94
-# $MidnightBSD$
+# $FreeBSD: stable/10/usr.bin/chpass/Makefile 207613 2010-05-04 11:34:13Z emaste $
 
 .include <bsd.own.mk>
 

Modified: trunk/usr.bin/chpass/chpass.1
===================================================================
--- trunk/usr.bin/chpass/chpass.1	2018-07-08 15:36:37 UTC (rev 11578)
+++ trunk/usr.bin/chpass/chpass.1	2018-07-08 15:38:12 UTC (rev 11579)
@@ -1,3 +1,4 @@
+.\" $MidnightBSD$
 .\" Copyright (c) 1988, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
 .\"
@@ -26,7 +27,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)chpass.1	8.2 (Berkeley) 12/30/93
-.\" $MidnightBSD$
+.\" $FreeBSD: stable/10/usr.bin/chpass/chpass.1 216370 2010-12-11 08:32:16Z joel $
 .\"
 .Dd December 30, 1993
 .Dt CHPASS 1


Property changes on: trunk/usr.bin/chpass/chpass.1
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/usr.bin/chpass/chpass.c
===================================================================
--- trunk/usr.bin/chpass/chpass.c	2018-07-08 15:36:37 UTC (rev 11578)
+++ trunk/usr.bin/chpass/chpass.c	2018-07-08 15:38:12 UTC (rev 11579)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1988, 1993, 1994
  *	The Regents of the University of California.  All rights reserved.
@@ -50,7 +51,7 @@
 #endif /* not lint */
 #endif
 #include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/chpass/chpass.c 243081 2012-11-15 15:06:18Z eadler $");
 
 #include <sys/param.h>
 

Modified: trunk/usr.bin/chpass/chpass.h
===================================================================
--- trunk/usr.bin/chpass/chpass.h	2018-07-08 15:36:37 UTC (rev 11578)
+++ trunk/usr.bin/chpass/chpass.h	2018-07-08 15:38:12 UTC (rev 11579)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (c) 1988, 1993, 1994
  *	The Regents of the University of California.  All rights reserved.
@@ -38,7 +39,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)chpass.h	8.4 (Berkeley) 4/2/94
- * $MidnightBSD$
+ * $FreeBSD: stable/10/usr.bin/chpass/chpass.h 227228 2011-11-06 17:20:44Z ed $
  */
 
 struct passwd;
@@ -48,7 +49,7 @@
 	int (*func)(char *, struct passwd *, struct _entry *);
 	int restricted;
 	size_t len;
-	char *except, *save;
+	const char *except, *save;
 } ENTRY;
 
 /* Field numbers. */

Modified: trunk/usr.bin/chpass/edit.c
===================================================================
--- trunk/usr.bin/chpass/edit.c	2018-07-08 15:36:37 UTC (rev 11578)
+++ trunk/usr.bin/chpass/edit.c	2018-07-08 15:38:12 UTC (rev 11579)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1990, 1993, 1994
  *	The Regents of the University of California.  All rights reserved.
@@ -45,7 +46,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/chpass/edit.c 113304 2003-04-09 18:18:42Z des $");
 
 #include <sys/param.h>
 #include <sys/stat.h>

Modified: trunk/usr.bin/chpass/field.c
===================================================================
--- trunk/usr.bin/chpass/field.c	2018-07-08 15:36:37 UTC (rev 11578)
+++ trunk/usr.bin/chpass/field.c	2018-07-08 15:38:12 UTC (rev 11579)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (c) 1988, 1993, 1994
  *	The Regents of the University of California.  All rights reserved.
@@ -45,7 +46,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/chpass/field.c 124692 2004-01-18 21:46:39Z charnier $");
 
 #include <sys/param.h>
 #include <sys/stat.h>

Modified: trunk/usr.bin/chpass/table.c
===================================================================
--- trunk/usr.bin/chpass/table.c	2018-07-08 15:36:37 UTC (rev 11578)
+++ trunk/usr.bin/chpass/table.c	2018-07-08 15:38:12 UTC (rev 11579)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1990, 1993, 1994
  *	The Regents of the University of California.  All rights reserved.
@@ -33,33 +34,30 @@
 #endif /* not lint */
 #endif
 #include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/chpass/table.c 227228 2011-11-06 17:20:44Z ed $");
 
 #include <sys/types.h>
 #include <stddef.h>
 #include "chpass.h"
 
-char e1[] = ": ";
-char e2[] = ":,";
-
 ENTRY list[] = {
-	{ "login",		p_login,  1,   5, e1,   NULL },
-	{ "password",		p_passwd, 1,   8, e1,   NULL },
-	{ "uid",		p_uid,    1,   3, e1,   NULL },
-	{ "gid",		p_gid,    1,   3, e1,   NULL },
-	{ "class",		p_class,  1,   5, e1,   NULL },
+	{ "login",		p_login,  1,   5, ": ", NULL },
+	{ "password",		p_passwd, 1,   8, ": ", NULL },
+	{ "uid",		p_uid,    1,   3, ": ", NULL },
+	{ "gid",		p_gid,    1,   3, ": ", NULL },
+	{ "class",		p_class,  1,   5, ": ", NULL },
 	{ "change",		p_change, 1,   6, NULL, NULL },
 	{ "expire",		p_expire, 1,   6, NULL, NULL },
 #ifdef RESTRICT_FULLNAME_CHANGE		/* do not allow fullname changes */
-	{ "full name",		p_gecos,  1,   9, e2,   NULL },
+	{ "full name",		p_gecos,  1,   9, ":,", NULL },
 #else
-	{ "full name",		p_gecos,  0,   9, e2,   NULL },
+	{ "full name",		p_gecos,  0,   9, ":,", NULL },
 #endif
-	{ "office phone",	p_gecos,  0,  12, e2,   NULL },
-	{ "home phone",		p_gecos,  0,  10, e2,   NULL },
-	{ "office location",	p_gecos,  0,  15, e2,   NULL },
-	{ "other information",	p_gecos,  0,  11, e1,   NULL },
-	{ "home directory",	p_hdir,   1,  14, e1,   NULL },
-	{ "shell",		p_shell,  0,   5, e1,   NULL },
+	{ "office phone",	p_gecos,  0,  12, ":,", NULL },
+	{ "home phone",		p_gecos,  0,  10, ":,", NULL },
+	{ "office location",	p_gecos,  0,  15, ":,", NULL },
+	{ "other information",	p_gecos,  0,  11, ": ", NULL },
+	{ "home directory",	p_hdir,   1,  14, ": ", NULL },
+	{ "shell",		p_shell,  0,   5, ": ", NULL },
 	{ NULL, NULL, 0, 0, NULL, NULL },
 };

Modified: trunk/usr.bin/chpass/util.c
===================================================================
--- trunk/usr.bin/chpass/util.c	2018-07-08 15:36:37 UTC (rev 11578)
+++ trunk/usr.bin/chpass/util.c	2018-07-08 15:38:12 UTC (rev 11579)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1988, 1993, 1994
  *	The Regents of the University of California.  All rights reserved.
@@ -44,7 +45,7 @@
 #endif
 #endif /* not lint */
 #include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/chpass/util.c 231651 2012-02-14 10:11:45Z kevlo $");
 
 #include <sys/types.h>
 
@@ -110,10 +111,10 @@
 			}
 		}
 	}
-	if (!(t = strtok((char *)NULL, " \t,")) || !isdigit(*t))
+	if (!(t = strtok(NULL, " \t,")) || !isdigit(*t))
 		goto bad;
 	day = atoi(t);
-	if (!(t = strtok((char *)NULL, " \t,")) || !isdigit(*t))
+	if (!(t = strtok(NULL, " \t,")) || !isdigit(*t))
 		goto bad;
 	year = atoi(t);
 	if (day < 1 || day > 31 || month < 1 || month > 12)



More information about the Midnightbsd-cvs mailing list