From owner-freebsd-current@freebsd.org Fri Apr 21 11:55:27 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 B943CD49F79 for ; Fri, 21 Apr 2017 11:55:27 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-eopbgr670040.outbound.protection.outlook.com [40.107.67.40]) (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 764687EC; Fri, 21 Apr 2017 11:55:26 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM (10.165.218.133) by YTXPR01MB0190.CANPRD01.PROD.OUTLOOK.COM (10.165.218.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.10; Fri, 21 Apr 2017 11:55:25 +0000 Received: from YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM ([10.165.218.133]) by YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM ([10.165.218.133]) with mapi id 15.01.1034.015; Fri, 21 Apr 2017 11:55:25 +0000 From: Rick Macklem To: "freebsd-current@freebsd.org" CC: Bruce Evans Subject: kernel coding of nobody/nogroup Thread-Topic: kernel coding of nobody/nogroup Thread-Index: AQHSupVvbJrpgbKdBUG9y5YrNoVVww== Date: Fri, 21 Apr 2017 11:55:25 +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; YTXPR01MB0190; 7:/lm3EkerbJyHPZjgRGoMd94kLCpTidEfE+OHs/CH49oPJuDfpz3wWm/I1Zxu/Bfj/PqrpnZkfQvy12iQfLFzz1yGIKQ7uXBBaK4rk5asI2tPmAVrkjVLKhsdfKoKftEfdbAyZCXSsAG1fsaL76N1R8fN5l01APcmnF2t4bk4Bw/AlBIjafLfQLTQaMM6f5kD2WmIOOHglWqDhcYKRFDJuIgeqTfin+3TD0KL8t89jtsLhDU7KzT+la4Yv1602T8sPMKG52WKx8APIM6vcwLCXmJ7zx22y4+q5ezkDlhNLl23/gLPlM3cqjhHB3JK9mbZGye2q2lLatAfxncm0tDg2w== x-ms-office365-filtering-correlation-id: db46e37b-ffdc-48a1-dd57-08d488ad4c09 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:YTXPR01MB0190; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(6041248)(20161123562025)(20161123564025)(20161123560025)(201703131423075)(201702281529075)(201702281528075)(201703061421075)(20161123555025)(6072148); SRVR:YTXPR01MB0190; BCL:0; PCL:0; RULEID:; SRVR:YTXPR01MB0190; x-forefront-prvs: 02843AA9E0 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39410400002)(39850400002)(39450400003)(39840400002)(39400400002)(50986999)(5640700003)(189998001)(2906002)(3280700002)(3660700001)(6436002)(7696004)(74482002)(2351001)(33656002)(6916009)(8936002)(81166006)(53936002)(55016002)(86362001)(122556002)(8676002)(450100002)(5660300001)(305945005)(2900100001)(110136004)(4326008)(102836003)(9686003)(38730400002)(551544002)(25786009)(2501003)(6506006)(74316002)(77096006)(54356999); DIR:OUT; SFP:1101; SCL:1; SRVR:YTXPR01MB0190; H:YTXPR01MB0189.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 11:55:25.0975 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTXPR01MB0190 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 11:55:27 -0000 Hi, 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. 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.) rick ps: These values are usually set by nfsuserd(8), but need to be initialized= for the case where is in not being run. The default uid/gid in nfsuserd.c needs t= o be fixed too, although they only get used if there isn't an entry for nobody/nogro= up in the password/group database.=