diff options
Diffstat (limited to 'recipes-security/selinux/selinux-python')
3 files changed, 4 insertions, 81 deletions
diff --git a/recipes-security/selinux/selinux-python/fix-TypeError-for-seobject.py.patch b/recipes-security/selinux/selinux-python/fix-TypeError-for-seobject.py.patch deleted file mode 100644 index 62cdeee..0000000 --- a/recipes-security/selinux/selinux-python/fix-TypeError-for-seobject.py.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From 98c2944ffa3e35095187e1df9ff33498bbd0fa54 Mon Sep 17 00:00:00 2001 | ||
2 | From: Wenzong Fan <wenzong.fan@windriver.com> | ||
3 | Date: Tue, 1 Apr 2014 02:53:36 -0400 | ||
4 | Subject: [PATCH] policycoreutils: fix TypeError for seobject.py | ||
5 | |||
6 | File "/usr/lib64/python2.7/site-packages/seobject.py", line 109, in log | ||
7 | message += " sename=" + sename | ||
8 | TypeError: cannot concatenate 'str' and 'NoneType' objects | ||
9 | |||
10 | Uptream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
13 | |||
14 | --- | ||
15 | semanage/seobject.py | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/semanage/seobject.py b/semanage/seobject.py | ||
19 | index 70fd192..23ab77e 100644 | ||
20 | --- a/semanage/seobject.py | ||
21 | +++ b/semanage/seobject.py | ||
22 | @@ -146,7 +146,7 @@ except: | ||
23 | |||
24 | def log(self, msg, name="", sename="", serole="", serange="", oldsename="", oldserole="", oldserange=""): | ||
25 | message = " %s name=%s" % (msg, name) | ||
26 | - if sename != "": | ||
27 | + if sename != "" and sename != None: | ||
28 | message += " sename=" + sename | ||
29 | if oldsename != "": | ||
30 | message += " oldsename=" + oldsename | ||
diff --git a/recipes-security/selinux/selinux-python/fix-sepolicy-install-path.patch b/recipes-security/selinux/selinux-python/fix-sepolicy-install-path.patch index 6f68c94..30a19eb 100644 --- a/recipes-security/selinux/selinux-python/fix-sepolicy-install-path.patch +++ b/recipes-security/selinux/selinux-python/fix-sepolicy-install-path.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From c1aae6cc131371729f098e4b0aa02142a85b5890 Mon Sep 17 00:00:00 2001 | 1 | From e57022e3577770188ad3570005b7107a09cf3bb9 Mon Sep 17 00:00:00 2001 |
2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> | 2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> |
3 | Date: Mon, 23 Sep 2013 21:17:59 +0800 | 3 | Date: Mon, 23 Sep 2013 21:17:59 +0800 |
4 | Subject: [PATCH] policycoreutils: fix install path for new pymodule sepolicy | 4 | Subject: [PATCH] policycoreutils: fix install path for new pymodule sepolicy |
@@ -13,10 +13,10 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
13 | 1 file changed, 3 insertions(+), 1 deletion(-) | 13 | 1 file changed, 3 insertions(+), 1 deletion(-) |
14 | 14 | ||
15 | diff --git a/sepolicy/Makefile b/sepolicy/Makefile | 15 | diff --git a/sepolicy/Makefile b/sepolicy/Makefile |
16 | index fb8a132..a6ee749 100644 | 16 | index 69f29fa..a18d1c3 100644 |
17 | --- a/sepolicy/Makefile | 17 | --- a/sepolicy/Makefile |
18 | +++ b/sepolicy/Makefile | 18 | +++ b/sepolicy/Makefile |
19 | @@ -8,6 +8,8 @@ BASHCOMPLETIONDIR ?= $(PREFIX)/share/bash-completion/completions | 19 | @@ -9,6 +9,8 @@ BASHCOMPLETIONDIR ?= $(PREFIX)/share/bash-completion/completions |
20 | CFLAGS ?= -Wall -Werror -Wextra -W | 20 | CFLAGS ?= -Wall -Werror -Wextra -W |
21 | override CFLAGS += -DPACKAGE="policycoreutils" -DSHARED -shared | 21 | override CFLAGS += -DPACKAGE="policycoreutils" -DSHARED -shared |
22 | 22 | ||
@@ -25,7 +25,7 @@ index fb8a132..a6ee749 100644 | |||
25 | BASHCOMPLETIONS=sepolicy-bash-completion.sh | 25 | BASHCOMPLETIONS=sepolicy-bash-completion.sh |
26 | 26 | ||
27 | all: python-build | 27 | all: python-build |
28 | @@ -26,7 +28,7 @@ test: | 28 | @@ -27,7 +29,7 @@ test: |
29 | @$(PYTHON) test_sepolicy.py -v | 29 | @$(PYTHON) test_sepolicy.py -v |
30 | 30 | ||
31 | install: | 31 | install: |
diff --git a/recipes-security/selinux/selinux-python/process-ValueError-for-sepolicy-seobject.patch b/recipes-security/selinux/selinux-python/process-ValueError-for-sepolicy-seobject.patch deleted file mode 100644 index b0bcd1d..0000000 --- a/recipes-security/selinux/selinux-python/process-ValueError-for-sepolicy-seobject.patch +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | From 1a8bd0ca13746b5241af5736dee9a25ab360652b Mon Sep 17 00:00:00 2001 | ||
2 | From: Wenzong Fan <wenzong.fan@windriver.com> | ||
3 | Date: Sun, 30 Mar 2014 22:25:59 -0400 | ||
4 | Subject: [PATCH] semanage: process ValueError for sepolicy, seobject | ||
5 | |||
6 | The sepolicy, seobject modules raise many unprocessed ValueError, just | ||
7 | process them in semanage to make the script proivdes error message but | ||
8 | not error trace. | ||
9 | |||
10 | Uptream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
13 | |||
14 | --- | ||
15 | semanage/semanage | 11 +++++++---- | ||
16 | 1 file changed, 7 insertions(+), 4 deletions(-) | ||
17 | |||
18 | diff --git a/semanage/semanage b/semanage/semanage | ||
19 | index 313537c..2977dd0 100644 | ||
20 | --- a/semanage/semanage | ||
21 | +++ b/semanage/semanage | ||
22 | @@ -25,8 +25,14 @@ | ||
23 | |||
24 | import traceback | ||
25 | import argparse | ||
26 | -import seobject | ||
27 | import sys | ||
28 | +try: | ||
29 | + import seobject | ||
30 | + import sepolicy | ||
31 | +except ValueError, e: | ||
32 | + print "Error: %s\n" % e | ||
33 | + sys.exit(1) | ||
34 | + | ||
35 | PROGNAME = "policycoreutils" | ||
36 | try: | ||
37 | import gettext | ||
38 | @@ -73,9 +79,6 @@ usage_interface_dict = {' --add': ('-t TYPE', '-r RANGE', 'interface'), ' --modi | ||
39 | usage_boolean = "semanage boolean [-h] [-n] [-N] [-S STORE] [" | ||
40 | usage_boolean_dict = {' --modify': ('(', '--on', '|', '--off', ')', 'boolean'), ' --list': ('-C',), ' --extract': ('',), ' --deleteall': ('',)} | ||
41 | |||
42 | -import sepolicy | ||
43 | - | ||
44 | - | ||
45 | class CheckRole(argparse.Action): | ||
46 | |||
47 | def __call__(self, parser, namespace, value, option_string=None): | ||