]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - cddl/compat/opensolaris/include/priv.h
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
[FreeBSD/stable/10.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_ */