Hide Forgot
Description of problem: I have a setup where selinux has been disabled. I install some packages which perform setsebool as part of the %post section in rpm. This setsebool fails as selinux is disabled. When I enable selinux on a later date and restorecon on the all the directories, I would not get the sebool set. If the setsebool command worked(by worked I mean updating a policy file or some config file) even if selinux was disabled, it would be a one step process for me to enable seliux on a later date. How reproducible: Always Steps to Reproduce: 1. Disable selinux by editing /etc/sysconfig/selinux and reboot 2. setsebool -P samba_load_libgfapi=1 (errors out) 3. enable selinux by editing /etc/sysconfig/selinux and reboot 4. semanage boolean -l | grep samba_load_libgfapi Actual results: No change in the bool value by step 2 Expected results: setsebool should change the config immediately, only whether it comes into effect or not should be dependent on selinux status. I understand that there might be technical limitations to achieve what has been asked here. If that is the case please provide explanation for the same and also workarounds for packages to be able to set sebools in such situations to make it easier for end-user.
semanage boolean, I believe will work with SELinux disabled.
(In reply to Daniel Walsh from comment #2) > semanage boolean, I believe will work with SELinux disabled. This is correct: $ sudo sestatus SELinux status: disabled $ sudo semanage boolean -N -S targeted -m --on samba_load_libgfapi $ sudo cat /etc/selinux/targeted/active/booleans.local # This file is auto-generated by libsemanage # Do not edit directly. samba_load_libgfapi=1 $