From 33d37c13fc61e8718cb52962595c6c96fc879310 Mon Sep 17 00:00:00 2001 From: Sheldon Hearn Date: Tue, 31 Aug 1999 13:11:39 +0000 Subject: [PATCH] Back out previous commit. I mistook passing commentary from bde for review. Requested by: bde --- lib/libc/gen/pw_scan.c | 15 ++++++--------- usr.sbin/pwd_mkdb/pw_scan.c | 15 ++++++--------- usr.sbin/pwd_mkdb/pwd_mkdb.8 | 8 -------- 3 files changed, 12 insertions(+), 26 deletions(-) diff --git a/lib/libc/gen/pw_scan.c b/lib/libc/gen/pw_scan.c index e03b49c7234d..5190686e5e78 100644 --- a/lib/libc/gen/pw_scan.c +++ b/lib/libc/gen/pw_scan.c @@ -56,9 +56,6 @@ static const char rcsid[] = #include "pw_scan.h" -static int big_uids = 0; /* Used for legacy max uid_t warning */ -static int big_gids = 0; /* Used for legacy max gid_t warning */ - int pw_scan(bp, pw) char *bp; @@ -87,9 +84,9 @@ pw_scan(bp, pw) warnx("root uid should be 0"); return (0); } - if (id > USHRT_MAX && !(big_uids++)) { - warnx("%s > legacy max uid value (%d): " - "no more such warnings", p, USHRT_MAX); + if (id > USHRT_MAX) { + warnx("%s > max uid value (%d)", p, USHRT_MAX); + /*return (0);*/ /* THIS SHOULD NOT BE FATAL! */ } pw->pw_uid = id; @@ -97,9 +94,9 @@ pw_scan(bp, pw) goto fmt; if(p[0]) pw->pw_fields |= _PWF_GID; id = atol(p); - if (id > USHRT_MAX && !(big_gids++)) { - warnx("%s > max gid value (%d): " - "no more such warnings", p, USHRT_MAX); + if (id > USHRT_MAX) { + warnx("%s > max gid value (%d)", p, USHRT_MAX); + /* return (0); This should not be fatal! */ } pw->pw_gid = id; diff --git a/usr.sbin/pwd_mkdb/pw_scan.c b/usr.sbin/pwd_mkdb/pw_scan.c index e03b49c7234d..5190686e5e78 100644 --- a/usr.sbin/pwd_mkdb/pw_scan.c +++ b/usr.sbin/pwd_mkdb/pw_scan.c @@ -56,9 +56,6 @@ static const char rcsid[] = #include "pw_scan.h" -static int big_uids = 0; /* Used for legacy max uid_t warning */ -static int big_gids = 0; /* Used for legacy max gid_t warning */ - int pw_scan(bp, pw) char *bp; @@ -87,9 +84,9 @@ pw_scan(bp, pw) warnx("root uid should be 0"); return (0); } - if (id > USHRT_MAX && !(big_uids++)) { - warnx("%s > legacy max uid value (%d): " - "no more such warnings", p, USHRT_MAX); + if (id > USHRT_MAX) { + warnx("%s > max uid value (%d)", p, USHRT_MAX); + /*return (0);*/ /* THIS SHOULD NOT BE FATAL! */ } pw->pw_uid = id; @@ -97,9 +94,9 @@ pw_scan(bp, pw) goto fmt; if(p[0]) pw->pw_fields |= _PWF_GID; id = atol(p); - if (id > USHRT_MAX && !(big_gids++)) { - warnx("%s > max gid value (%d): " - "no more such warnings", p, USHRT_MAX); + if (id > USHRT_MAX) { + warnx("%s > max gid value (%d)", p, USHRT_MAX); + /* return (0); This should not be fatal! */ } pw->pw_gid = id; diff --git a/usr.sbin/pwd_mkdb/pwd_mkdb.8 b/usr.sbin/pwd_mkdb/pwd_mkdb.8 index c3b68a294010..32233538cef7 100644 --- a/usr.sbin/pwd_mkdb/pwd_mkdb.8 +++ b/usr.sbin/pwd_mkdb/pwd_mkdb.8 @@ -149,14 +149,6 @@ style databases for the password file but depended on the calling programs to install them. The program was renamed in order that previous users of the program not be surprised by the changes in functionality. -.Pp -The -.Nm -program will produce warnings if it finds a UID or GID larger than the -historical maximum (USHRT_MAX), as these may cause problems for software -which assumes such a maximum. -Only the first such UID and the first such GID will produce a -warning. .Sh SEE ALSO .Xr chpass 1 , .Xr passwd 1 ,