Skip to contentSkip to conversation

libsepol: add support for new polcap genfs_seclabel_symlinks

PATCH Applied Christian Göttsche 2 participants 3 messages Jan 31, 2020 – Feb 6, 2020 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libsepol: add support for new polcap genfs_seclabel_symlinks

Add support for new SELinux policy capability genfs_seclabel_symlinks. With this capability enabled symlinks on kernel filesystems will receive contexts based on genfscon statements, like directories and files, and not be restricted to the respective filesystem root sid.

---
 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
index dc9356a6..40669fb5 100644
@@ -13,6 +13,7 @@ enum {
 	POLICYDB_CAPABILITY_ALWAYSNETWORK,
 	POLICYDB_CAPABILITY_CGROUPSECLABEL,
 	POLICYDB_CAPABILITY_NNP_NOSUID_TRANSITION,
+	POLICYDB_CAPABILITY_GENFS_SECLABEL_SYMLINKS,
 	__POLICYDB_CAPABILITY_MAX
 };
 #define POLICYDB_CAPABILITY_MAX (__POLICYDB_CAPABILITY_MAX - 1)
libsepol/src/polcaps.c +1 -0
index b9dc3526..67ed5786 100644
@@ -12,6 +12,7 @@ static const char *polcap_names[] = {
 	"always_check_network",		/* POLICYDB_CAPABILITY_ALWAYSNETWORK */
 	"cgroup_seclabel",		/* POLICYDB_CAPABILITY_SECLABEL */
 	"nnp_nosuid_transition",	/* POLICYDB_CAPABILITY_NNP_NOSUID_TRANSITION */
+	"genfs_seclabel_symlinks",	/* POLICYDB_CAPABILITY_GENFS_SECLABEL_SYMLINKS */
 	NULL
 };
 
Signature · 1 line
2.25.0
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Christian Göttsche

Add support for new SELinux policy capability genfs_seclabel_symlinks. With this capability enabled symlinks on kernel filesystems will receive contexts based on genfscon statements, like directories and files, and not be restricted to the respective filesystem root sid.

Quoted 30 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
index dc9356a6..40669fb5 100644
@@ -13,6 +13,7 @@ enum {
  	POLICYDB_CAPABILITY_ALWAYSNETWORK,
  	POLICYDB_CAPABILITY_CGROUPSECLABEL,
  	POLICYDB_CAPABILITY_NNP_NOSUID_TRANSITION,
+	POLICYDB_CAPABILITY_GENFS_SECLABEL_SYMLINKS,
  	__POLICYDB_CAPABILITY_MAX
  };
  #define POLICYDB_CAPABILITY_MAX (__POLICYDB_CAPABILITY_MAX - 1)
libsepol/src/polcaps.c +1 -0
index b9dc3526..67ed5786 100644
@@ -12,6 +12,7 @@ static const char *polcap_names[] = {
  	"always_check_network",		/* POLICYDB_CAPABILITY_ALWAYSNETWORK */
  	"cgroup_seclabel",		/* POLICYDB_CAPABILITY_SECLABEL */
  	"nnp_nosuid_transition",	/* POLICYDB_CAPABILITY_NNP_NOSUID_TRANSITION */
+	"genfs_seclabel_symlinks",	/* POLICYDB_CAPABILITY_GENFS_SECLABEL_SYMLINKS */
  	NULL
  };
 
#2 lore raw
Quoted 9 lines · Stephen Smalley
Quoted 6 lines · Christian Göttsche

Add support for new SELinux policy capability genfs_seclabel_symlinks. With this capability enabled symlinks on kernel filesystems will receive contexts based on genfscon statements, like directories and files, and not be restricted to the respective filesystem root sid.

Applied.