From owner-svn-src-all@FreeBSD.ORG Sun Jan 25 15:36:43 2015 Return-Path: Delivered-To: svn-src-all@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 BBEE7323; Sun, 25 Jan 2015 15:36:43 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72E19154; Sun, 25 Jan 2015 15:36:43 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YFPEu-000LMB-51; Sun, 25 Jan 2015 18:36:40 +0300 Date: Sun, 25 Jan 2015 18:36:40 +0300 From: Slawa Olhovchenkov To: Bruce Evans Subject: Re: svn commit: r277652 - in head/usr.sbin/pw: . tests Message-ID: <20150125153639.GC76051@zxy.spb.ru> References: <201501241913.t0OJD4xT039188@svn.freebsd.org> <20150125155254.V1007@besplex.bde.org> <20150125142148.GA76051@zxy.spb.ru> <20150126014336.P2572@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150126014336.P2572@besplex.bde.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 15:36:43 -0000 On Mon, Jan 26, 2015 at 02:31:05AM +1100, Bruce Evans wrote: > On Sun, 25 Jan 2015, Slawa Olhovchenkov wrote: > > > On Sun, Jan 25, 2015 at 04:56:24PM +1100, Bruce Evans wrote: > > > >> Negative ids have historical abuses in places like mountd. 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 = 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. > > > > This is not full true for ZFS case. > > On ZFS nobody is 2^32-2. > > File systems don't get to decide this. zfs actually uses 2^16-2. It ls -l /usr/ports/packages32/lang total 2 lrwxr-xr-x 1 4294967294 wheel 33 Mar 17 2012 perl-threaded-5.12.4_4.tbz -> ../All/perl-threaded-5.12.4_4.tbz lrwxr-xr-x 1 4294967294 wheel 27 Mar 17 2012 python27-2.7.2_4.tbz -> ../All/python27-2.7.2_4.tbz lrwxr-xr-x 1 4294967294 wheel 21 Mar 17 2012 tcl-8.5.11.tbz -> ../All/tcl-8.5.11.tbz lrwxr-xr-x 1 4294967294 wheel 29 Mar 17 2012 tcl-modules-8.5.11.tbz -> ../All/tcl-modules-8.5.11.tbz Same in solaris, as i know.