summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Zaman <perfinion@gentoo.org>2016-10-23 18:24:19 +0800
committerJason Zaman <perfinion@gentoo.org>2016-10-24 23:38:14 +0800
commitca6d84ff0bfc15606079d88358f5cf924bcdb3a1 (patch)
tree20d1fec111f877c1a5b7f3e7ada49dbd0eebc816 /sys-libs
parentsys-libs/libselinux: bump to 2.6 final release (diff)
downloadgentoo-ca6d84ff0bfc15606079d88358f5cf924bcdb3a1.tar.gz
gentoo-ca6d84ff0bfc15606079d88358f5cf924bcdb3a1.tar.bz2
gentoo-ca6d84ff0bfc15606079d88358f5cf924bcdb3a1.zip
sys-libs/libsemanage: bump to 2.6 final release
Also include patch for genhomedircon non-MLS issue Package-Manager: portage-2.3.0
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/libsemanage/Manifest2
-rw-r--r--sys-libs/libsemanage/files/libsemanage-2.6-0001-libsemanage-genhomedircon-only-set-MLS-level-if-MLS-.patch38
-rw-r--r--sys-libs/libsemanage/libsemanage-2.6.ebuild (renamed from sys-libs/libsemanage/libsemanage-2.6_rc2.ebuild)3
-rw-r--r--sys-libs/libsemanage/libsemanage-9999.ebuild2
4 files changed, 42 insertions, 3 deletions
diff --git a/sys-libs/libsemanage/Manifest b/sys-libs/libsemanage/Manifest
index 90e445074f7e..6f2acf696a4e 100644
--- a/sys-libs/libsemanage/Manifest
+++ b/sys-libs/libsemanage/Manifest
@@ -1,2 +1,2 @@
DIST libsemanage-2.5.tar.gz 152884 SHA256 46e2f36254369b6e91d1eea0460c262b139361b055a3a67d3ceea2d8ef72e006 SHA512 cf644b77d8a24f76c630ece582df1b49a0c5f48f1c9f79b1caee0df10372008954406974472a072360dbe6de5ebc19b1b21bb247084d75b7186f61b32f33b8ec WHIRLPOOL 397b7fd2e9b2c00dbc2f58bdc023501dcd7ecf1212fef9ad7993b4763a041068416ef06552c0abf0beef8c69f4704933feca36951866c43d867181332971f6be
-DIST libsemanage-2.6-rc2.tar.gz 155934 SHA256 672bd1c3c6faeca483d90515a03ac9b65b6596064f49cd4cfbbb53c186d08a47 SHA512 fb794738d7497709441248b1ba3abe35aac7bbfaf7dc875d0c50733f871e5e90b209aefe912584f1e08d3aba596dd569caad749c236440662ba16b1c64727511 WHIRLPOOL afd746fca0b4d2a616996ca7346242f50ab35591df050ede9805a9e8aa958a4c8b474a62fd10aea99971f0bf7507a1d0d9d6e4e7b79b8095eea32feeaba1a2d6
+DIST libsemanage-2.6.tar.gz 155897 SHA256 4f81541047290b751f2ffb926fcd381c186f22db18d9fe671b0b4a6a54e8cfce SHA512 38741d6e6f7a2669bfeee362e42d6bfd720cceeaf61331e329b2210fdc070444e529656ce86dd82e94aa248eafcfaea4c5d013d9cce76c1039be6fc6a6b2c790 WHIRLPOOL 9fb781c637c4725dd48fa07898fd5db4b2f1e47264e80468e3c9b48fd8afc6bcb6494a44ccbfb0e48dec10dc5db461ab8e1941251d625854ebbebdbfdacb971c
diff --git a/sys-libs/libsemanage/files/libsemanage-2.6-0001-libsemanage-genhomedircon-only-set-MLS-level-if-MLS-.patch b/sys-libs/libsemanage/files/libsemanage-2.6-0001-libsemanage-genhomedircon-only-set-MLS-level-if-MLS-.patch
new file mode 100644
index 000000000000..e3123ed70fe0
--- /dev/null
+++ b/sys-libs/libsemanage/files/libsemanage-2.6-0001-libsemanage-genhomedircon-only-set-MLS-level-if-MLS-.patch
@@ -0,0 +1,38 @@
+From 4cf9b9ce2df06fd5a29e5264a6552c9b02ec0b5b Mon Sep 17 00:00:00 2001
+From: Stephen Smalley <sds@tycho.nsa.gov>
+Date: Fri, 14 Oct 2016 13:36:37 -0400
+Subject: [PATCH] libsemanage: genhomedircon: only set MLS level if MLS is
+ enabled
+
+When a non-MLS policy was used with genhomedircon context_from_record()
+in sepol would report an error because an MLS level was present when MLS
+is disabled. Based on a patch by Gary Tierney, amended to use
+sepol_policydb_mls_enabled rather than semanage_mls_enabled because
+we are testing the temporary working policy, not the active policy.
+
+Reported-by: Jason Zaman <jason@perfinion.com>
+Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
+---
+ libsemanage/src/genhomedircon.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/libsemanage/src/genhomedircon.c b/libsemanage/src/genhomedircon.c
+index 6991fff..5e9d722 100644
+--- libsemanage/src/genhomedircon.c
++++ libsemanage/src/genhomedircon.c
+@@ -638,7 +638,11 @@ static int write_contexts(genhomedircon_settings_t *s, FILE *out,
+ goto fail;
+ }
+
+- if (sepol_context_set_user(sepolh, context, user->sename) < 0 ||
++ if (sepol_context_set_user(sepolh, context, user->sename) < 0) {
++ goto fail;
++ }
++
++ if (sepol_policydb_mls_enabled(s->policydb) &&
+ sepol_context_set_mls(sepolh, context, user->level) < 0) {
+ goto fail;
+ }
+--
+2.7.3
+
diff --git a/sys-libs/libsemanage/libsemanage-2.6_rc2.ebuild b/sys-libs/libsemanage/libsemanage-2.6.ebuild
index 2b625f502cbf..9094e96b36e1 100644
--- a/sys-libs/libsemanage/libsemanage-2.6_rc2.ebuild
+++ b/sys-libs/libsemanage/libsemanage-2.6.ebuild
@@ -8,7 +8,7 @@ PYTHON_COMPAT=( python{2_7,3_4,3_5} )
inherit multilib python-r1 toolchain-funcs multilib-minimal
MY_P="${P//_/-}"
-MY_RELEASEDATE="20161006"
+MY_RELEASEDATE="20161014"
SEPOL_VER="${PV}"
SELNX_VER="${PV}"
@@ -73,6 +73,7 @@ src_prepare() {
echo "bzip-small=true" >> "${S}/src/semanage.conf"
eapply "${FILESDIR}"/${PN}-2.6-build-paths.patch
+ eapply "${FILESDIR}"/${PN}-2.6-0001-libsemanage-genhomedircon-only-set-MLS-level-if-MLS-.patch
eapply_user
diff --git a/sys-libs/libsemanage/libsemanage-9999.ebuild b/sys-libs/libsemanage/libsemanage-9999.ebuild
index 2b625f502cbf..ae2129710625 100644
--- a/sys-libs/libsemanage/libsemanage-9999.ebuild
+++ b/sys-libs/libsemanage/libsemanage-9999.ebuild
@@ -8,7 +8,7 @@ PYTHON_COMPAT=( python{2_7,3_4,3_5} )
inherit multilib python-r1 toolchain-funcs multilib-minimal
MY_P="${P//_/-}"
-MY_RELEASEDATE="20161006"
+MY_RELEASEDATE="20161014"
SEPOL_VER="${PV}"
SELNX_VER="${PV}"