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