From owner-svn-src-all@freebsd.org Tue Jun 16 02:31:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 892CE34AD7E; Tue, 16 Jun 2020 02:31:23 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49mByz2xQMz48r3; Tue, 16 Jun 2020 02:31:23 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6037B279B5; Tue, 16 Jun 2020 02:31:23 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05G2VNBm091583; Tue, 16 Jun 2020 02:31:23 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05G2VN7P091582; Tue, 16 Jun 2020 02:31:23 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202006160231.05G2VN7P091582@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 16 Jun 2020 02:31:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362214 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 362214 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 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: Tue, 16 Jun 2020 02:31:23 -0000 Author: rmacklem Date: Tue Jun 16 02:31:22 2020 New Revision: 362214 URL: https://svnweb.freebsd.org/changeset/base/362214 Log: Expose UID_xxx and GID_xxx definitions to userspace. This patch moves the UID_xxx and GID_xxx definitions out of the #ifdef _KERNEL section, so that userspace programs like mountd can use them. There are a couple of userspace programs that do define UID_ROOT, but they do not include sys/conf.h. Since they are defined as the same value, maybe they should be changed to include sys/conf.h. Reviewed by: kib Differential Revision: https:/reviews.freebsd.org/D25281 Modified: head/sys/sys/conf.h Modified: head/sys/sys/conf.h ============================================================================== --- head/sys/sys/conf.h Tue Jun 16 01:11:40 2020 (r362213) +++ head/sys/sys/conf.h Tue Jun 16 02:31:22 2020 (r362214) @@ -147,6 +147,23 @@ typedef int dumper_hdr_t(struct dumperinfo *di, struct #define D_TTY 0x0004 #define D_MEM 0x0008 /* /dev/(k)mem */ +/* Defined uid and gid values. */ +#define UID_ROOT 0 +#define UID_BIN 3 +#define UID_UUCP 66 +#define UID_NOBODY 65534 + +#define GID_WHEEL 0 +#define GID_KMEM 2 +#define GID_TTY 4 +#define GID_OPERATOR 5 +#define GID_BIN 7 +#define GID_GAMES 13 +#define GID_VIDEO 44 +#define GID_DIALER 68 +#define GID_NOGROUP 65533 +#define GID_NOBODY 65534 + #ifdef _KERNEL #define D_TYPEMASK 0xffff @@ -308,22 +325,6 @@ void devfs_clear_cdevpriv(void); ino_t devfs_alloc_cdp_inode(void); void devfs_free_cdp_inode(ino_t ino); - -#define UID_ROOT 0 -#define UID_BIN 3 -#define UID_UUCP 66 -#define UID_NOBODY 65534 - -#define GID_WHEEL 0 -#define GID_KMEM 2 -#define GID_TTY 4 -#define GID_OPERATOR 5 -#define GID_BIN 7 -#define GID_GAMES 13 -#define GID_VIDEO 44 -#define GID_DIALER 68 -#define GID_NOGROUP 65533 -#define GID_NOBODY 65534 typedef void (*dev_clone_fn)(void *arg, struct ucred *cred, char *name, int namelen, struct cdev **result);