xref: /openbsd/sys/dev/pci/drm/include/linux/capability.h (revision 09467b48)
1 /* Public domain. */
2 
3 #ifndef _LINUX_CAPABILITY_H
4 #define _LINUX_CAPABILITY_H
5 
6 #include <sys/param.h>
7 #include <sys/systm.h>
8 #include <sys/ucred.h>
9 #include <machine/cpu.h>
10 
11 #define CAP_SYS_ADMIN	0x1
12 static inline int
13 capable(int cap)
14 {
15 	KASSERT(cap == CAP_SYS_ADMIN);
16 	return suser(curproc) == 0;
17 }
18 
19 #endif
20