xref: /freebsd/cddl/compat/opensolaris/include/priv.h (revision 4436b51dff5736e74da464946049ea6899a88938)
1 /* $FreeBSD$ */
2 
3 #ifndef	_OPENSOLARIS_PRIV_H_
4 #define	_OPENSOLARIS_PRIV_H_
5 
6 #include <sys/types.h>
7 #include <unistd.h>
8 #include <assert.h>
9 
10 #define	PRIV_SYS_CONFIG	0
11 
12 static __inline int
13 priv_ineffect(int priv)
14 {
15 
16 	assert(priv == PRIV_SYS_CONFIG);
17 	return (geteuid() == 0);
18 }
19 
20 #endif	/* !_OPENSOLARIS_PRIV_H_ */
21