xref: /freebsd/cddl/compat/opensolaris/include/priv.h (revision b9f654b163bce26de79705e77b872427c9f2afa1)
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