summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXin Ouyang <Xin.Ouyang@windriver.com>2012-03-27 17:37:53 +0800
committerXin Ouyang <Xin.Ouyang@windriver.com>2012-03-27 17:37:53 +0800
commit75e818530fc1ca0bb71cd3ee501dd69fa04a4918 (patch)
treeee0a36a9e561bf986633e10846955e04f6ec5931
parentc93ca621128395084b08c7b3f44e02d7b1b3e066 (diff)
downloadmeta-selinux-75e818530fc1ca0bb71cd3ee501dd69fa04a4918.tar.gz
setools: Patch for neverallow rules.
-rw-r--r--recipes-security/setools/setools/setools-neverallow-rules-all-always-fail.patch31
-rw-r--r--recipes-security/setools/setools_3.3.7.bb1
2 files changed, 32 insertions, 0 deletions
diff --git a/recipes-security/setools/setools/setools-neverallow-rules-all-always-fail.patch b/recipes-security/setools/setools/setools-neverallow-rules-all-always-fail.patch
new file mode 100644
index 0000000..a165dae
--- /dev/null
+++ b/recipes-security/setools/setools/setools-neverallow-rules-all-always-fail.patch
@@ -0,0 +1,31 @@
1From 4360fae5a6fbee9c8866573fe5a8af2fdae4944d Mon Sep 17 00:00:00 2001
2From: Xin Ouyang <Xin.Ouyang@windriver.com>
3Date: Fri, 9 Mar 2012 10:18:35 +0800
4Subject: [PATCH] setools: neverallow rules all always fail.
5
6Since we do not ship neverallow rules all always fail.
7ERROR: Cannot get avrules: Neverallow rules requested but not available
8ERROR: Operation not supported
9---
10 libqpol/src/avrule_query.c | 3 +++
11 1 files changed, 3 insertions(+), 0 deletions(-)
12
13diff --git a/libqpol/src/avrule_query.c b/libqpol/src/avrule_query.c
14index 749565b..e7d42fc 100644
15--- a/libqpol/src/avrule_query.c
16+++ b/libqpol/src/avrule_query.c
17@@ -57,8 +57,11 @@ int qpol_policy_get_avrule_iter(const qpol_policy_t * policy, uint32_t rule_type
18
19 if ((rule_type_mask & QPOL_RULE_NEVERALLOW) && !qpol_policy_has_capability(policy, QPOL_CAP_NEVERALLOW)) {
20 ERR(policy, "%s", "Cannot get avrules: Neverallow rules requested but not available");
21+ /*
22 errno = ENOTSUP;
23 return STATUS_ERR;
24+ */
25+ return STATUS_SUCCESS;
26 }
27
28 db = &policy->p->p;
29--
301.7.5.4
31
diff --git a/recipes-security/setools/setools_3.3.7.bb b/recipes-security/setools/setools_3.3.7.bb
index bb6dcf0..ae53fb7 100644
--- a/recipes-security/setools/setools_3.3.7.bb
+++ b/recipes-security/setools/setools_3.3.7.bb
@@ -15,6 +15,7 @@ SRC_URI[sha256sum] = "2bfa0918746bdcc910b16b26a51109a4ffd07404c306141ada584cb36e
15 15
16SRC_URI += "file://setools-Add-seinfo-and-sesearch-python-bindings.patch" 16SRC_URI += "file://setools-Add-seinfo-and-sesearch-python-bindings.patch"
17SRC_URI += "file://setools-seinfo-should-exit-with-correct-errno.patch" 17SRC_URI += "file://setools-seinfo-should-exit-with-correct-errno.patch"
18SRC_URI += "file://setools-neverallow-rules-all-always-fail.patch"
18SRC_URI += "file://setools-Fix-man-pages-and-getoptions.patch" 19SRC_URI += "file://setools-Fix-man-pages-and-getoptions.patch"
19SRC_URI += "file://setools-Fix-sepol-calls-to-work-with-latest-libsepol.patch" 20SRC_URI += "file://setools-Fix-sepol-calls-to-work-with-latest-libsepol.patch"
20SRC_URI += "file://setools-Changes-to-support-named-file_trans-rules.patch" 21SRC_URI += "file://setools-Changes-to-support-named-file_trans-rules.patch"