From owner-freebsd-current@freebsd.org Fri Apr 21 20:37:43 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 5E2E7D49289 for ; Fri, 21 Apr 2017 20:37:43 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-QB1-obe.outbound.protection.outlook.com (mail-eopbgr660044.outbound.protection.outlook.com [40.107.66.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0E79D19F6; Fri, 21 Apr 2017 20:37:41 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YQBPR01MB0180.CANPRD01.PROD.OUTLOOK.COM (10.169.141.138) by YQBPR01MB0177.CANPRD01.PROD.OUTLOOK.COM (10.169.141.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1047.13; Fri, 21 Apr 2017 20:37:40 +0000 Received: from YQBPR01MB0180.CANPRD01.PROD.OUTLOOK.COM ([10.169.141.138]) by YQBPR01MB0180.CANPRD01.PROD.OUTLOOK.COM ([10.169.141.138]) with mapi id 15.01.1047.017; Fri, 21 Apr 2017 20:37:40 +0000 From: Rick Macklem To: "freebsd-current@freebsd.org" CC: Bruce Evans Subject: default uid/gid for nfsuserd.c Thread-Topic: default uid/gid for nfsuserd.c Thread-Index: AQHSut7CZwZ+FcnFl0mbMiTu2jq7iw== Date: Fri, 21 Apr 2017 20:37:40 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: FreeBSD.org; dkim=none (message not signed) header.d=none;FreeBSD.org; dmarc=none action=none header.from=uoguelph.ca; x-microsoft-exchange-diagnostics: 1; YQBPR01MB0177; 7:ps1ioIZDWErRm0awf4ZGsy69yjyhrsxe8EnhKQEeOxdOBa02Y44LiLOt2WZGgknszTcir/XkJMvYRZXOjNMuinxMnASLSI9WdIP2iB5JyxVBxcckYm4Urwxf+fGYoGdZRBP6aWh4CX8YFRc6YMe2BACsYPy6dCDz8oOb9PjNRshC9raPhYezMITFoEX0BmONosHw/+EwxHmS5DWFpVAUJOed/B1P4kH1Wz+oIP84+fpwgxDFaD4oaR+o52dvYxdI/M+u07BKiCCEAttyObOXb/Ke7EfePFOPsx+TVmVuEHXTDf05pR+moa87z7Z5hpbKooJ3473oDTvScXbcIadjeg== x-ms-office365-filtering-correlation-id: 4ed9b921-e4e0-4b7e-38f1-08d488f64115 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:YQBPR01MB0177; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(6041248)(20161123564025)(201703131423075)(201702281529075)(201702281528075)(201703061421075)(20161123560025)(20161123562025)(20161123555025)(6072148); SRVR:YQBPR01MB0177; BCL:0; PCL:0; RULEID:; SRVR:YQBPR01MB0177; x-forefront-prvs: 02843AA9E0 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39850400002)(39400400002)(39410400002)(39840400002)(39450400003)(2351001)(305945005)(102836003)(189998001)(3660700001)(5660300001)(50986999)(2900100001)(6916009)(2906002)(8676002)(7696004)(55016002)(4326008)(81166006)(54356999)(450100002)(74482002)(3280700002)(6436002)(25786009)(8936002)(53936002)(5640700003)(38730400002)(86362001)(551544002)(6506006)(2501003)(77096006)(33656002)(110136004)(122556002)(74316002); DIR:OUT; SFP:1101; SCL:1; SRVR:YQBPR01MB0177; H:YQBPR01MB0180.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; MLV:sfv; LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Apr 2017 20:37:40.0734 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YQBPR01MB0177 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 20:37:43 -0000 Hi, I just added GID_NOGROUP to sys/conf.h and fixed the initial values for nobody/nogroup in the kernel. However, UID_NOBODY and GID_NOGROUP are in the _KERNEL section of sys/conf.h, so they aren't visible in userland. So, how to I set the initial uid/gid values for nfsuserd.c? (nfsuserd.c looks for entries in the password and group databases, so these= defaults only get used if it doesn't find an entry in the database.) I don't mind using the hardcoded values, but is there a better way? (Moving the #define's out of the _KERNEL section maybe?) rick=