Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Nov 1999 10:59:40 -0800 (PST)
From:      Tom <tom@uniserve.com>
To:        Vadim Belman <voland@plab.ku.dk>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: pwd_mkdb max uid warning.
Message-ID:  <Pine.BSF.4.02A.9911171057350.2820-100000@shell.uniserve.ca>
In-Reply-To: <85iu312bp7.fsf@dialup90.apex.dp.ua>

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

On 17 Nov 1999, Vadim Belman wrote:

> 	Recently I answered a question concerning maximum valid UID
> 	value. I had created a new user with UID 1000000 using pw
> 	utility. Everything went smoothly, but pwd_mkdb warned about
> 	creation of UID bigger than 65535. I found this piece of code in
> 	/usr/src/usr.sbin/pwd_mkdb/pw_scan.c:
> 
>         if (id > USHRT_MAX) {
>                 warnx("%s > max uid value (%d)", p, USHRT_MAX);
>                 /*return (0);*/ /* THIS SHOULD NOT BE FATAL! */
>         }
> 
> 	I see only one reason for this: for keeping compatibility with old
> 	utilities which don't use uid_t but relay on unsigned short
> 	values. Am I right? Is there any other reason? Or, perhaps, this
> 	code is obsolete and may be removed without harm?

  I expect that there are many problems with uids > 65535.  16 bit uids
are assumed by many protocols and data formats.

  For instance, NFSv2 wouldn't support uids > 65535.  A lot of people are
still using NFSv2, and should be warned about possible problems.

> -- 
>     /Voland			Vadim Belman
> 				E-mail: voland@plab.ku.dk

Tom



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.02A.9911171057350.2820-100000>