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