diff options
author | Petr Lautrbach <plautrba@redhat.com> | 2017-05-03 12:30:27 +0200 |
---|---|---|
committer | Stephen Smalley <sds@tycho.nsa.gov> | 2017-05-05 11:52:19 -0400 |
commit | 2a0102a27052ba99b42199c99a1caa6f9444e5e1 (patch) | |
tree | 0d8adc8535c5e4b546d292e964f94a49b45c1cb3 /dbus/selinux_server.py | |
parent | f82771c1059fd07b5d68faae70bd5e487f818341 (diff) | |
download | android_external_selinux-2a0102a27052ba99b42199c99a1caa6f9444e5e1.tar.gz android_external_selinux-2a0102a27052ba99b42199c99a1caa6f9444e5e1.tar.bz2 android_external_selinux-2a0102a27052ba99b42199c99a1caa6f9444e5e1.zip |
sepolicy: Adapt to new the semodule list output
semodule in policycoreutils-2.4 changed the list format. With this
patch, org.selinux.semodule_list uses 'semodule --list=full' and the
code using this was adapted to the new format.
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1281309
Fixes:
File "/usr/lib64/python3.4/site-packages/sepolicy/gui.py", line 670, in lockdown_init
self.enable_unconfined_button.set_active(not self.module_dict["unconfined"]["Disabled"])
KeyError: 'unconfined'
Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
Diffstat (limited to 'dbus/selinux_server.py')
-rw-r--r-- | dbus/selinux_server.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dbus/selinux_server.py b/dbus/selinux_server.py index 8bd1fe5b..aae8b5fa 100644 --- a/dbus/selinux_server.py +++ b/dbus/selinux_server.py @@ -46,13 +46,13 @@ class selinux_server(slip.dbus.service.Object): return buf # - # The semodule_list method will return the output of semodule -l, using the customized polkit, + # The semodule_list method will return the output of semodule --list=full, using the customized polkit, # since this is a readonly behaviour # @slip.dbus.polkit.require_auth("org.selinux.semodule_list") @dbus.service.method("org.selinux", in_signature='', out_signature='s') def semodule_list(self): - p = Popen(["/usr/sbin/semodule", "-l"], stdout=PIPE, stderr=PIPE) + p = Popen(["/usr/sbin/semodule", "--list=full"], stdout=PIPE, stderr=PIPE) buf = p.stdout.read() output = p.communicate() if p.returncode and p.returncode != 0: |