diff options
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 | 47 |
1 files changed, 0 insertions, 47 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 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): | ||
