From owner-freebsd-current@freebsd.org Fri Apr 21 12:56:31 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF885D4687C for ; Fri, 21 Apr 2017 12:56:31 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 884F7A33; Fri, 21 Apr 2017 12:56:31 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id AEDBC106915; Fri, 21 Apr 2017 22:56:20 +1000 (AEST) Date: Fri, 21 Apr 2017 22:56:20 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Rick Macklem cc: "freebsd-current@freebsd.org" , Bruce Evans Subject: Re: kernel coding of nobody/nogroup In-Reply-To: Message-ID: <20170421222601.U2526@besplex.bde.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=VbSHBBh9 c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=IqtoMd2DKtP-fSBSbEwA:9 a=CjuIK1q_8ugA:10 X-Mailman-Approved-At: Fri, 21 Apr 2017 14:14:09 +0000 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2017 12:56:31 -0000 On Fri, 21 Apr 2017, Rick Macklem wrote: > I need to set the default uid/gid values for nobody/nogroup into kernel > variables. I reverted the commit that hardcoded them, since I agree that > wasn't a good thing to do. > > I didn't realize that "nobody" was already defined in sys/conf.h and I can > use that. I didn't know nobody was already there either. They are only used by zfs, while the others were originally only sed for devices. > There is no definition for "nogroup" in sys/conf.h. > Would it be ok to add > #define GID_NOGROUP 65533 > to syy/conf.h? > (I know bde@ doesn't like expressing this as 65533, but that is what it is in /etc/group.) sys/conf.h already has GID_NOBODY but it is subtly different from GID_NOGROUP. It seems to be a bug that zfs uses nobody's gid instead of the gid nogroup which is used by no body. Bruce