Skip to content

Commit 9c40c89

Browse files
nkapronstephensmalley
authored andcommitted
libsepol: Support functionfs_seclabel policycap
This adds the necessary userspace pieces to support the functionfs_seclabel policycap which enables per-file labels in functionfs and the ability for userspace to apply the labels. With the policycap disabled, legacy behaviors are maintained and per-file labeling is disallowed. Signed-off-by: Neill Kapron <[email protected]> Acked-by: Stephen Smalley <[email protected]>
1 parent 6ff10ba commit 9c40c89

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

libsepol/include/sepol/policydb/polcaps.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ enum {
1919
POLICYDB_CAP_NETLINK_XPERM,
2020
POLICYDB_CAP_NETIF_WILDCARD,
2121
POLICYDB_CAP_GENFS_SECLABEL_WILDCARD,
22+
POLICYDB_CAP_FUNCTIONFS_SECLABEL,
2223
__POLICYDB_CAP_MAX
2324
};
2425
#define POLICYDB_CAP_MAX (__POLICYDB_CAP_MAX - 1)

libsepol/src/polcaps.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ static const char * const polcap_names[POLICYDB_CAP_MAX + 1] = {
1818
[POLICYDB_CAP_NETLINK_XPERM] = "netlink_xperm",
1919
[POLICYDB_CAP_NETIF_WILDCARD] = "netif_wildcard",
2020
[POLICYDB_CAP_GENFS_SECLABEL_WILDCARD] = "genfs_seclabel_wildcard",
21+
[POLICYDB_CAP_FUNCTIONFS_SECLABEL] = "functionfs_seclabel",
2122
};
2223

2324
int sepol_polcap_getnum(const char *name)

0 commit comments

Comments
 (0)