libsepol: add memfd_class capability
PATCH 1/1 libsepol: add memfd_class capability
memfd_class was declared upstream in [1]. Add it to the list of known capabilities.
[1] https://lore.kernel.org/selinux/[email protected]/
--- libsepol/include/sepol/policydb/polcaps.h | 1 + libsepol/src/polcaps.c | 1 + 2 files changed, 2 insertions(+)
libsepol/include/sepol/policydb/polcaps.h +1 -0
@@ -19,6 +19,7 @@ enum {POLICYDB_CAP_NETLINK_XPERM ,POLICYDB_CAP_NETIF_WILDCARD ,POLICYDB_CAP_GENFS_SECLABEL_WILDCARD , +POLICYDB_CAP_MEMFD_CLASS , __POLICYDB_CAP_MAX };#define POLICYDB_CAP_MAX (__POLICYDB_CAP_MAX - 1)
libsepol/src/polcaps.c +1 -0
@@ -18,6 +18,7 @@ static const char * const polcap_names[POLICYDB_CAP_MAX + 1] = { [POLICYDB_CAP_NETLINK_XPERM] = "netlink_xperm", [POLICYDB_CAP_NETIF_WILDCARD] = "netif_wildcard", [POLICYDB_CAP_GENFS_SECLABEL_WILDCARD] = "genfs_seclabel_wildcard", + [POLICYDB_CAP_MEMFD_CLASS] = "memfd_class", };int sepol_polcap_getnum (const char *name)
Signature · 1 line
2.51.0.338.gd7d06c2dae-goog
Stephen Smalley
maintainerQuoted 7 lines · Thiébaud Weksteen
memfd_classwas declared upstream in [1]. Add it to the list of known capabilities.[1] https://lore.kernel.org/selinux/[email protected]/
Signed-off-by Thiébaud Weksteen <[email protected]>
Just a reminder for the other SELinux userspace maintainers that we need to wait until we see which policy capability ends up being reserved in the upstream kernel before applying this patch. And a reminder of the following longstanding open issue that is relevant, https://github.com/SELinuxProject/selinux/issues/55
Quoted 32 lines
--- libsepol/include/sepol/policydb/polcaps.h | 1 + libsepol/src/polcaps.c | 1 + 2 files changed, 2 insertions(+)libsepol/include/sepol/policydb/polcaps.h +1
-0@@ -19,6 +19,7 @@ enum {POLICYDB_CAP_NETLINK_XPERM ,POLICYDB_CAP_NETIF_WILDCARD ,POLICYDB_CAP_GENFS_SECLABEL_WILDCARD , +POLICYDB_CAP_MEMFD_CLASS , __POLICYDB_CAP_MAX };#define POLICYDB_CAP_MAX (__POLICYDB_CAP_MAX - 1)libsepol/src/polcaps.c +1
-1@@ -18,6 +18,7 @@ static const char * const polcap_names[POLICYDB_CAP_MAX + 1] = { [POLICYDB_CAP_NETLINK_XPERM] = "netlink_xperm", [POLICYDB_CAP_NETIF_WILDCARD] = "netif_wildcard", [POLICYDB_CAP_GENFS_SECLABEL_WILDCARD] = "genfs_seclabel_wildcard", + [POLICYDB_CAP_MEMFD_CLASS] = "memfd_class", };int sepol_polcap_getnum (const char *name) --2.51.0.338.gd7d06c2dae-goog
Quoted 7 lines · Thiébaud Weksteen
memfd_classwas declared upstream in [1]. Add it to the list of known capabilities.[1] https://lore.kernel.org/selinux/[email protected]/
Signed-off-by Thiébaud Weksteen <[email protected]>
Will re-base on merge.
Quoted 32 lines
--- libsepol/include/sepol/policydb/polcaps.h | 1 + libsepol/src/polcaps.c | 1 + 2 files changed, 2 insertions(+)libsepol/include/sepol/policydb/polcaps.h +1
-0@@ -19,6 +19,7 @@ enum {POLICYDB_CAP_NETLINK_XPERM ,POLICYDB_CAP_NETIF_WILDCARD ,POLICYDB_CAP_GENFS_SECLABEL_WILDCARD , +POLICYDB_CAP_MEMFD_CLASS , __POLICYDB_CAP_MAX };#define POLICYDB_CAP_MAX (__POLICYDB_CAP_MAX - 1)libsepol/src/polcaps.c +1
-1@@ -18,6 +18,7 @@ static const char * const polcap_names[POLICYDB_CAP_MAX + 1] = { [POLICYDB_CAP_NETLINK_XPERM] = "netlink_xperm", [POLICYDB_CAP_NETIF_WILDCARD] = "netif_wildcard", [POLICYDB_CAP_GENFS_SECLABEL_WILDCARD] = "genfs_seclabel_wildcard", + [POLICYDB_CAP_MEMFD_CLASS] = "memfd_class", };int sepol_polcap_getnum (const char *name) --2.51.0.338.gd7d06c2dae-goog
Stephen Smalley
maintainerQuoted 6 lines · Stephen Smalley
Quoted 4 lines · Thiébaud Weksteen
memfd_classwas declared upstream in [1]. Add it to the list of known capabilities.
Quoted 7 lines
Quoted 3 lines
[1] https://lore.kernel.org/selinux/[email protected]/
Signed-off-by Thiébaud Weksteen <[email protected]>Acked-by Stephen Smalley <[email protected]>Will re-base on merge.
Thanks, now merged - note that the policy capability number changed due to the previous merge of the functionfs_seclabel polcap.
Quoted 33 lines
Quoted 33 lines
--- libsepol/include/sepol/policydb/polcaps.h | 1 + libsepol/src/polcaps.c | 1 + 2 files changed, 2 insertions(+)libsepol/include/sepol/policydb/polcaps.h +1
-0@@ -19,6 +19,7 @@ enum {POLICYDB_CAP_NETLINK_XPERM ,POLICYDB_CAP_NETIF_WILDCARD ,POLICYDB_CAP_GENFS_SECLABEL_WILDCARD , +POLICYDB_CAP_MEMFD_CLASS , __POLICYDB_CAP_MAX };#define POLICYDB_CAP_MAX (__POLICYDB_CAP_MAX - 1)libsepol/src/polcaps.c +1
-1@@ -18,6 +18,7 @@ static const char * const polcap_names[POLICYDB_CAP_MAX + 1] = { [POLICYDB_CAP_NETLINK_XPERM] = "netlink_xperm", [POLICYDB_CAP_NETIF_WILDCARD] = "netif_wildcard", [POLICYDB_CAP_GENFS_SECLABEL_WILDCARD] = "genfs_seclabel_wildcard", + [POLICYDB_CAP_MEMFD_CLASS] = "memfd_class", };int sepol_polcap_getnum (const char *name) --2.51.0.338.gd7d06c2dae-goog
Stephen Smalley
maintainerQuoted 11 lines · Stephen Smalley
Quoted 8 lines · Stephen Smalley
Quoted 6 lines · Thiébaud Weksteen
memfd_classwas declared upstream in [1]. Add it to the list of known capabilities.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Thiébaud Weksteen <[email protected]>Acked-by Stephen Smalley <[email protected]>Will re-base on merge.
Thanks, now merged - note that the policy capability number changed due to the previous merge of the
functionfs_seclabelpolcap.
With apologies, this has now been reverted due to the kernel revert. Happy to re-base on top when/if the kernel patch lands.
Stephen Smalley
maintainerQuoted 18 lines · Stephen Smalley
Quoted 15 lines · Stephen Smalley
Quoted 12 lines · Stephen Smalley
Quoted 7 lines · Thiébaud Weksteen
memfd_classwas declared upstream in [1]. Add it to the list of known capabilities.[1] https://lore.kernel.org/selinux/[email protected]/
Signed-off-by Thiébaud Weksteen <[email protected]>Acked-by Stephen Smalley <[email protected]>
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Will re-base on merge.
Thanks, now merged - note that the policy capability number changed due to the previous merge of the
functionfs_seclabelpolcap.With apologies, this has now been reverted due to the kernel revert. Happy to re-base on top when/if the kernel patch lands.
Now re-applied, hopefully for good this time.