fedora-selinux / selinux

Fedora SELinux Userspace
Other
21 stars 17 forks source link

python/semanage/seobject: Fix listing boolean values #57

Closed vmojzis closed 5 years ago

vmojzis commented 5 years ago

Fix gathering boolean values by fixing always False if condition (determining whether the values are listed from local store).

Fix listing boolean values by printing the correct values and not forcing the use of security_get_boolean_active (which causes crash when listing booleans that are not present in active policy).

Fixes:

dnf install selinux-policy-mls

# cat > mypolicy.cil
(boolean xyz false)

# semodule -i mypolicy.cil -s mls

# semanage boolean -l -S mls
...
irssi_use_full_network         (off  ,  off)  Allow the Irssi IRC Client to connect to any port, and to bind to any unreserved port.
mozilla_plugin_use_bluejeans   (off  ,  off)  Allow mozilla plugin to use Bluejeans.
OSError: No such file or directory

Signed-off-by: Vit Mojzis vmojzis@redhat.com

(cherry-picked from SELinuxProject commit 259ab083fa02aaa9eb385cf6b0de30a1919a817b)

bachradsusi commented 5 years ago

259ab083fa02aaa9eb385cf6b0de30a1919a817b