Subject: Re: 30000 users?
To: Jukka Marin <jmarin@pyy.jmp.fi>
From: Jordan K. Hubbard <jkh@time.cdrom.com>
List: port-i386
Date: 02/28/1997 07:40:27
> > pwd_mkdb: 1048576 > max uid value (65535)
> > pwd_mkdb: at line #12
> > pwd_mkdb: /etc/ptmp: Inappropriate file type or format
> 
> Yep, happens on my 1.2 system, too.  Sigh.

Just to close the loop on this - FreeBSD's pwd_mkdb spits out a
warning message for this but does not exit.  NetBSD spits out a fatal
message and exits.  I think both are wrong, so thanks for pointing
this out. :-)

Just FYI, I'm going to run the following change to FreeBSD past the
reviewers - you may wish to do something similar:

--- /usr/src/usr.sbin/pwd_mkdb/pw_scan.c.orig   Fri Feb 28 07:37:48 1997
+++ /usr/src/usr.sbin/pwd_mkdb/pw_scan.c        Fri Feb 28 07:37:49 1997
@@ -81,8 +81,8 @@
                warnx("root uid should be 0");
                return (0);
        }
-       if (id > USHRT_MAX) {
-               warnx("%s > max uid value (%d)", p, USHRT_MAX);
+       if (id > UINT_MAX) {
+               warnx("%s > max uid value (%d)", p, UINT_MAX);
                /*return (0);*/ /* THIS SHOULD NOT BE FATAL! */
        }
        pw->pw_uid = id;
@@ -91,8 +91,8 @@
                goto fmt;
        if(p[0]) pw->pw_fields |= _PWF_GID;
        id = atol(p);
-       if (id > USHRT_MAX) {
-               warnx("%s > max gid value (%d)", p, USHRT_MAX);
+       if (id > UINT_MAX) {
+               warnx("%s > max gid value (%d)", p, UINT_MAX);
                /* return (0); This should not be fatal! */
        }
        pw->pw_gid = id;