]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - cddl/compat/opensolaris/include/priv.h
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / cddl / compat / opensolaris / include / priv.h
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_ */