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