diff options
author | Wenzong Fan <wenzong.fan@windriver.com> | 2017-09-04 22:59:49 -0700 |
---|---|---|
committer | Mark Hatle <mark.hatle@windriver.com> | 2017-09-13 19:48:51 -0500 |
commit | 1d3df562b781c7c9f9c54e65f2ac5972d2a0b022 (patch) | |
tree | c2c6f84c4cb81bc21fdb343eccc5a9df179e1fcd /recipes-security/selinux/selinux-python/process-ValueError-for-sepolicy-seobject.patch | |
parent | a5b5f5b328fa7f059fbfe8480bd107379bfe8d21 (diff) | |
download | meta-selinux-1d3df562b781c7c9f9c54e65f2ac5972d2a0b022.tar.gz |
selinux-python: add package 2.7 (20170804)
Move packages to python/*:
- policycoreutils/semanage -> python/semanage
- policycoreutils/audit2allow -> python/audit2allow
- policycoreutils/sepolgen-ifgen -> python/audit2allow/sepolgen-ifgen
- policycoreutils/sepolicy -> python/sepolicy
- policycoreutils/scripts/chcat -> python/chcat
- sepolgen -> python/sepolgen
* Move and rebase patches:
- policycoreutils-fix-TypeError-for-seobject.py.patch
- policycoreutils-fix-sepolicy-install-path.patch
- policycoreutils-process-ValueError-for-sepolicy-seobject.patch
* Cleanup policycoreutils.inc and policycoreutils_2.7.bb
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Update policycoreutils_git.bb
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'recipes-security/selinux/selinux-python/process-ValueError-for-sepolicy-seobject.patch')
-rw-r--r-- | recipes-security/selinux/selinux-python/process-ValueError-for-sepolicy-seobject.patch | 49 |
1 files changed, 49 insertions, 0 deletions
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 new file mode 100644 index 0000000..1929aa5 --- /dev/null +++ b/recipes-security/selinux/selinux-python/process-ValueError-for-sepolicy-seobject.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | From b8e07bd0643b581ac33c96a1f94ae17c8df80ffd 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 | semanage/semanage | 11 +++++++---- | ||
15 | 1 file changed, 7 insertions(+), 4 deletions(-) | ||
16 | |||
17 | diff --git a/semanage/semanage b/semanage/semanage | ||
18 | index 19a6c51..c0083c6 100644 | ||
19 | --- a/semanage/semanage | ||
20 | +++ b/semanage/semanage | ||
21 | @@ -25,8 +25,14 @@ | ||
22 | |||
23 | import traceback | ||
24 | import argparse | ||
25 | -import seobject | ||
26 | import sys | ||
27 | +try: | ||
28 | + import seobject | ||
29 | + import sepolicy | ||
30 | +except ValueError, e: | ||
31 | + print "Error: %s\n" % e | ||
32 | + sys.exit(1) | ||
33 | + | ||
34 | PROGNAME = "policycoreutils" | ||
35 | try: | ||
36 | import gettext | ||
37 | @@ -67,9 +73,6 @@ usage_interface_dict = {' --add': ('-t TYPE', '-r RANGE', 'interface'), ' --modi | ||
38 | usage_boolean = "semanage boolean [-h] [-n] [-N] [-S STORE] [" | ||
39 | usage_boolean_dict = {' --modify': ('(', '--on', '|', '--off', ')', 'boolean'), ' --list': ('-C',), ' --extract': ('',), ' --deleteall': ('',)} | ||
40 | |||
41 | -import sepolicy | ||
42 | - | ||
43 | - | ||
44 | class CheckRole(argparse.Action): | ||
45 | |||
46 | def __call__(self, parser, namespace, value, option_string=None): | ||
47 | -- | ||
48 | 2.7.4 | ||
49 | |||