diff options
Diffstat (limited to 'cddl/compat/opensolaris/include/priv.h')
-rw-r--r-- | cddl/compat/opensolaris/include/priv.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cddl/compat/opensolaris/include/priv.h b/cddl/compat/opensolaris/include/priv.h new file mode 100644 index 000000000000..78eae1a3cda2 --- /dev/null +++ b/cddl/compat/opensolaris/include/priv.h @@ -0,0 +1,18 @@ +#ifndef _OPENSOLARIS_PRIV_H_ +#define _OPENSOLARIS_PRIV_H_ + +#include <sys/types.h> +#include <unistd.h> +#include <assert.h> + +#define PRIV_SYS_CONFIG 0 + +static __inline int +priv_ineffect(priv) +{ + + assert(priv == PRIV_SYS_CONFIG); + return (geteuid() == 0); +} + +#endif /* !_OPENSOLARIS_PRIV_H_ */ |