xref: /aosp_15_r20/external/selinux/libsepol/include/sepol/policydb/polcaps.h (revision 2d543d20722ada2425b5bdab9d0d1d29470e7bba)
1 #ifndef _SEPOL_POLICYDB_POLCAPS_H_
2 #define _SEPOL_POLICYDB_POLCAPS_H_
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 /* Policy capabilities */
9 enum {
10 	POLICYDB_CAP_NETPEER,
11 	POLICYDB_CAP_OPENPERM,
12 	POLICYDB_CAP_EXTSOCKCLASS,
13 	POLICYDB_CAP_ALWAYSNETWORK,
14 	POLICYDB_CAP_CGROUPSECLABEL,
15 	POLICYDB_CAP_NNP_NOSUID_TRANSITION,
16 	POLICYDB_CAP_GENFS_SECLABEL_SYMLINKS,
17 	POLICYDB_CAP_IOCTL_SKIP_CLOEXEC,
18 	POLICYDB_CAP_USERSPACE_INITIAL_CONTEXT,
19 	POLICYDB_CAP_NETLINK_XPERM,
20 	__POLICYDB_CAP_MAX
21 };
22 #define POLICYDB_CAP_MAX (__POLICYDB_CAP_MAX - 1)
23 
24 /* Convert a capability name to number. */
25 extern int sepol_polcap_getnum(const char *name);
26 
27 /* Convert a capability number to name. */
28 extern const char *sepol_polcap_getname(unsigned int capnum);
29 
30 #ifdef __cplusplus
31 }
32 #endif
33 
34 #endif /* _SEPOL_POLICYDB_POLCAPS_H_ */
35