diff options
author | Xin Ouyang <Xin.Ouyang@windriver.com> | 2012-03-27 17:37:53 +0800 |
---|---|---|
committer | Xin Ouyang <Xin.Ouyang@windriver.com> | 2012-03-27 17:37:53 +0800 |
commit | 75e818530fc1ca0bb71cd3ee501dd69fa04a4918 (patch) | |
tree | ee0a36a9e561bf986633e10846955e04f6ec5931 | |
parent | c93ca621128395084b08c7b3f44e02d7b1b3e066 (diff) | |
download | meta-selinux-75e818530fc1ca0bb71cd3ee501dd69fa04a4918.tar.gz |
setools: Patch for neverallow rules.
-rw-r--r-- | recipes-security/setools/setools/setools-neverallow-rules-all-always-fail.patch | 31 | ||||
-rw-r--r-- | recipes-security/setools/setools_3.3.7.bb | 1 |
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 @@ | |||
1 | From 4360fae5a6fbee9c8866573fe5a8af2fdae4944d Mon Sep 17 00:00:00 2001 | ||
2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> | ||
3 | Date: Fri, 9 Mar 2012 10:18:35 +0800 | ||
4 | Subject: [PATCH] setools: neverallow rules all always fail. | ||
5 | |||
6 | Since we do not ship neverallow rules all always fail. | ||
7 | ERROR: Cannot get avrules: Neverallow rules requested but not available | ||
8 | ERROR: Operation not supported | ||
9 | --- | ||
10 | libqpol/src/avrule_query.c | 3 +++ | ||
11 | 1 files changed, 3 insertions(+), 0 deletions(-) | ||
12 | |||
13 | diff --git a/libqpol/src/avrule_query.c b/libqpol/src/avrule_query.c | ||
14 | index 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 | -- | ||
30 | 1.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 | ||
16 | SRC_URI += "file://setools-Add-seinfo-and-sesearch-python-bindings.patch" | 16 | SRC_URI += "file://setools-Add-seinfo-and-sesearch-python-bindings.patch" |
17 | SRC_URI += "file://setools-seinfo-should-exit-with-correct-errno.patch" | 17 | SRC_URI += "file://setools-seinfo-should-exit-with-correct-errno.patch" |
18 | SRC_URI += "file://setools-neverallow-rules-all-always-fail.patch" | ||
18 | SRC_URI += "file://setools-Fix-man-pages-and-getoptions.patch" | 19 | SRC_URI += "file://setools-Fix-man-pages-and-getoptions.patch" |
19 | SRC_URI += "file://setools-Fix-sepol-calls-to-work-with-latest-libsepol.patch" | 20 | SRC_URI += "file://setools-Fix-sepol-calls-to-work-with-latest-libsepol.patch" |
20 | SRC_URI += "file://setools-Changes-to-support-named-file_trans-rules.patch" | 21 | SRC_URI += "file://setools-Changes-to-support-named-file_trans-rules.patch" |