diff options
author | Thomas Petazzoni <thomas.petazzoni@bootlin.com> | 2020-07-14 16:40:04 -0500 |
---|---|---|
committer | Paul Spooren <mail@aparcar.org> | 2020-09-11 14:50:24 -1000 |
commit | e697684d6f29824e685869353488a844dc7fde5a (patch) | |
tree | 94c10ff42cf36b6c41e0fc2517fbe107e3ca9bae /utils/selinux-python/patches | |
parent | d4a498040d71aa60b19003eb2f87a988bf69286d (diff) |
selinux-python: new package
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[update to 3.1, make use of Python 3, and update dependencies]
Signed-off-by: W. Michael Petullo <mike@flyn.org>
Diffstat (limited to 'utils/selinux-python/patches')
-rw-r--r-- | utils/selinux-python/patches/0001-sepolgen-adjust-data_dir.patch | 26 | ||||
-rw-r--r-- | utils/selinux-python/patches/0002-sepolgen-don-t-hardcode-search-for-ausearch-in-sbin.patch | 38 |
2 files changed, 64 insertions, 0 deletions
diff --git a/utils/selinux-python/patches/0001-sepolgen-adjust-data_dir.patch b/utils/selinux-python/patches/0001-sepolgen-adjust-data_dir.patch new file mode 100644 index 000000000..5b5426007 --- /dev/null +++ b/utils/selinux-python/patches/0001-sepolgen-adjust-data_dir.patch @@ -0,0 +1,26 @@ +From 4dfa91b1377b6dc57e66443ea1a08c6d79a3a6e2 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni <thomas.petazzoni@bootlin.com> +Date: Wed, 2 Oct 2019 12:04:24 +0200 +Subject: [PATCH] sepolgen: adjust data_dir() + +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> +--- + sepolgen/src/sepolgen/defaults.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sepolgen/src/sepolgen/defaults.py b/sepolgen/src/sepolgen/defaults.py +index 6e800695..a61d1efd 100644 +--- a/sepolgen/src/sepolgen/defaults.py ++++ b/sepolgen/src/sepolgen/defaults.py +@@ -57,7 +57,7 @@ Various default settings, including file and directory locations. + """ + + def data_dir(): +- return "/var/lib/sepolgen" ++ return "/usr/share/sepolgen" + + def perm_map(): + return data_dir() + "/perm_map" +-- +2.21.0 + diff --git a/utils/selinux-python/patches/0002-sepolgen-don-t-hardcode-search-for-ausearch-in-sbin.patch b/utils/selinux-python/patches/0002-sepolgen-don-t-hardcode-search-for-ausearch-in-sbin.patch new file mode 100644 index 000000000..0ebc3e593 --- /dev/null +++ b/utils/selinux-python/patches/0002-sepolgen-don-t-hardcode-search-for-ausearch-in-sbin.patch @@ -0,0 +1,38 @@ +From a8a7f8fb5cfe95f28cd5f7ff4b4679ca122fe410 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni <thomas.petazzoni@bootlin.com> +Date: Wed, 2 Oct 2019 13:38:18 +0200 +Subject: [PATCH] sepolgen: don't hardcode search for ausearch in /sbin + +ausearch may be installed in another location, just rely on PATH to +find ausearch. + +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> +--- + sepolgen/src/sepolgen/audit.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sepolgen/src/sepolgen/audit.py b/sepolgen/src/sepolgen/audit.py +index 4adb851f..5eafa587 100644 +--- a/sepolgen/src/sepolgen/audit.py ++++ b/sepolgen/src/sepolgen/audit.py +@@ -41,7 +41,7 @@ def get_audit_boot_msgs(): + s = time.localtime(time.time() - off) + bootdate = time.strftime("%x", s) + boottime = time.strftime("%X", s) +- output = subprocess.Popen(["/sbin/ausearch", "-m", "AVC,USER_AVC,MAC_POLICY_LOAD,DAEMON_START,SELINUX_ERR", "-ts", bootdate, boottime], ++ output = subprocess.Popen(["ausearch", "-m", "AVC,USER_AVC,MAC_POLICY_LOAD,DAEMON_START,SELINUX_ERR", "-ts", bootdate, boottime], + stdout=subprocess.PIPE).communicate()[0] + if util.PY3: + output = util.decode_input(output) +@@ -56,7 +56,7 @@ def get_audit_msgs(): + string contain all of the audit messages returned by ausearch. + """ + import subprocess +- output = subprocess.Popen(["/sbin/ausearch", "-m", "AVC,USER_AVC,MAC_POLICY_LOAD,DAEMON_START,SELINUX_ERR"], ++ output = subprocess.Popen(["ausearch", "-m", "AVC,USER_AVC,MAC_POLICY_LOAD,DAEMON_START,SELINUX_ERR"], + stdout=subprocess.PIPE).communicate()[0] + if util.PY3: + output = util.decode_input(output) +-- +2.21.0 + |