blob: db938d1bc9694b2bd7425d0f29714d444ae36da3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
/* Public domain. */
#ifndef _LINUX_CAPABILITY_H
#define _LINUX_CAPABILITY_H
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/ucred.h>
#include <machine/cpu.h>
#define CAP_SYS_ADMIN 0x1
static inline int
capable(int cap)
{
KASSERT(cap == CAP_SYS_ADMIN);
return suser(curproc) == 0;
}
#endif
|