From owner-svn-src-head@FreeBSD.ORG Mon Jan 26 21:20:49 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4BB7C25E; Mon, 26 Jan 2015 21:20:49 +0000 (UTC) Received: from shxd.cx (unknown [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33247F33; Mon, 26 Jan 2015 21:20:49 +0000 (UTC) Received: from 50-196-156-133-static.hfc.comcastbusiness.net ([50.196.156.133]:54577 helo=tinkerbell.pixel8networks.com) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1YFDFc-000BtM-2J; Sat, 24 Jan 2015 18:48:36 -0800 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) Subject: Re: svn commit: r277652 - in head/usr.sbin/pw: . tests From: Devin Teske In-Reply-To: <20150126014336.P2572@besplex.bde.org> Date: Mon, 26 Jan 2015 13:20:28 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <5D58B34B-8647-4B69-8D90-E7D37C98D4AD@FreeBSD.org> References: <201501241913.t0OJD4xT039188@svn.freebsd.org> <20150125155254.V1007@besplex.bde.org> <20150125142148.GA76051@zxy.spb.ru> <20150126014336.P2572@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1990.1) Sender: devin@shxd.cx Cc: Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, Slawa Olhovchenkov , svn-src-head@freebsd.org, Devin Teske X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 21:20:49 -0000 > On Jan 25, 2015, at 7:31 AM, Bruce Evans wrote: >=20 > On Sun, 25 Jan 2015, Slawa Olhovchenkov wrote: >=20 >> On Sun, Jan 25, 2015 at 04:56:24PM +1100, Bruce Evans wrote: >>=20 >>> Negative ids have historical abuses in places like mountd. Which paves the way for the =E2=80=9Caccepted practice=E2=80=9D argument and backed up by =E2=80=9Cin-the-field usage=E2=80=9D statement(s). >>> mountd still >>> hard-codes -2 and -2 for the default uid and gid of an unprivileged = user. >>> It at least casts these values to uid_t and gid_t before using them. >>> This gives the ids the non-random values of UINT32_MAX-1 if uid_t = and >>> gid_t are uint32_t. (If uid_t and gid_t were signed, then it would >>> leave the values as negative, so invalid.) These magic values may = work >>> better than when ids were 16 bits, since there is less risk of them >>> conflicting with a normal id. However, the non-conflict is probably >>> a bug. FreeBSD uses the magic ids of 65534 for user nobody: group >>> nobody. These would have been (id_t)-2 with 16-bit ids. They no >>> longer match, so ls displays (id_t)-2 numerically. FreeBSD also has >>> a group nogroup =3D 65553 that doesn't match the nfs usage. = However2, >>> in FreeBSD-1 wher ids were 16-bits, nobody was 32767 and nogroup was >>> 32766. so they didn't match nfs for other reasons. The 2 non-groups >>> now seem to be just a bug -- FreeBSD-1 didn't have group nobody. >>> 4.4BSD-Lite2 has the same values as FreeBSD-1. >>=20 >> This is not full true for ZFS case. >> On ZFS nobody is 2^32-2. >=20 > File systems don't get to decide this. +1 (and thanks for the historical account, bruce =E2=80=94 sincerely) However, I still want to make the argument that: a. Because we=E2=80=99ve supported mapping negative inputs to unsigned = values in pw *for over a decade*, that=E2=80=A6 b. We should either revert or make a relnotes submission to note that = we=E2=80=99re changing the long-standing accepted practice. Changing the accepted practice broke code internally, it would have = likely broken some external code as well =E2=80=94 and people deserve to = know about said change else we should continue to support accepted = practice that is decade(s) old. =E2=80=94=20 Devin