From owner-freebsd-stable Wed Nov 17 10:59:48 1999 Delivered-To: freebsd-stable@freebsd.org Received: from mail2.uniserve.com (mail2.uniserve.com [204.244.156.7]) by hub.freebsd.org (Postfix) with ESMTP id 1C02914BD8 for ; Wed, 17 Nov 1999 10:59:46 -0800 (PST) (envelope-from tom@uniserve.com) Received: from shell.uniserve.ca ([204.244.186.218]) by mail2.uniserve.com with smtp (Exim 3.03 #4) id 11oAIw-0001Fb-00; Wed, 17 Nov 1999 10:59:42 -0800 Date: Wed, 17 Nov 1999 10:59:40 -0800 (PST) From: Tom X-Sender: tom@shell.uniserve.ca To: Vadim Belman Cc: freebsd-stable@freebsd.org Subject: Re: pwd_mkdb max uid warning. In-Reply-To: <85iu312bp7.fsf@dialup90.apex.dp.ua> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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