svn commit: r362214 - head/sys/sys

Rick Macklem rmacklem at FreeBSD.org
Tue Jun 16 02:31:23 UTC 2020


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);


More information about the svn-src-head mailing list