Description of problem: Running the following command when selinux is disabled fails: semanage boolean -m --on httpd_can_network_connect SELinux: Could not downgrade policy file /etc/selinux/targeted/policy/policy.27, searching for an older version. SELinux: Could not open policy file <= /etc/selinux/targeted/policy/policy.27: No such file or directory /sbin/load_policy: Can't load policy: No such file or directory libsemanage.semanage_reload_policy: load_policy returned error code 2. This used to work in policycoreutils-python-2.1.11-6 Version-Release number of selected component (if applicable): policycoreutils-2.1.11-18.fc17.x86_64 More info: load_policy prints the same error. ll /etc/selinux/targeted/policy/policy.27 -rw-r--r-- 1 root root 4747112 Jun 25 10:45 /etc/selinux/targeted/policy/policy.27
Some more data: This issue blocks oVirt Engine setup when selinux disabled, and used to work in previous builds. [root@vm-18-254 ~]# uname -r 3.4.3-1.fc17.x86_64 [root@vm-18-254 ~]# sestatus SELinux status: disabled [root@vm-18-254 ~]# rpm -q libsepol libsemanage libselinux libsepol-2.1.5-3.fc17.x86_64 libsemanage-2.1.6-3.fc17.x86_64 libselinux-2.1.10-3.fc17.x86_64 Yum reinstall policycoreutils didn't help.
I think that is somehow related to the new --noreload option (which is new in 2.1.11-18). There is a new "reload" flag in the semanage code whose default value is true. Shouldn't semanage avoid calling /sbin/load_policy at all when SELinux is disabled, even if the --noreload option is not given?
I think this is fixed in the current release.
In Fedora 18 with the latest policycoreutil package it is still failing, but in a different way: [root@f18 ~]# rpm -q policycoreutils policycoreutils-2.1.13-55.fc18.x86_64 [root@f18 ~]# getenforce Disabled [root@f18 ~]# semanage boolean -m --on httpd_can_network_connect ERROR: Could not determine running system's policy version. ERROR: Unable to open policy /etc/selinux/targeted/policy/policy.27. Segmentation fault [root@f18 ~]# echo $? 139 [root@f18 ~]# ls -lZ /etc/selinux/targeted/policy/policy.27 -rw-r--r--. root root unconfined_u:object_r:semanage_store_t:s0 /etc/selinux/targeted/policy/policy.27
Ok try: policycoreutils-2.1.13-56.fc18
This is what happens with policycoreutils-2.1.13-56.fc18: [root@f18 ~]# rpm -q policycoreutils policycoreutils-2.1.13-56.fc18.x86_64 [root@f18 ~]# getenforce Disabled [root@f18 ~]# semanage boolean -m --on httpd_can_network_connect ERROR: Could not determine running system's policy version. ERROR: Unable to open policy /etc/selinux/targeted/policy/policy.27. SELinux: Could not downgrade policy file /etc/selinux/targeted/policy/policy.27, searching for an older version. SELinux: unable to find usable policy file: No such file or directory /sbin/load_policy: Can't load policy: No such file or directory libsemanage.semanage_reload_policy: load_policy returned error code 2. SELinux: Could not downgrade policy file /etc/selinux/targeted/policy/policy.27, searching for an older version. SELinux: unable to find usable policy file: No such file or directory /sbin/load_policy: Can't load policy: No such file or directory libsemanage.semanage_reload_policy: load_policy returned error code 2. /usr/sbin/semanage: Could not commit semanage transaction [root@f18 ~]# echo $? 1 [root@f18 ~]# ls -lZ /etc/selinux/targeted/policy/policy.27 -rw-r--r-- root root ? /etc/selinux/targeted/policy/policy.27
Well that is better since the policycoreutils is no longer crashing.
(In reply to comment #7) > Well that is better since the policycoreutils is no longer crashing. But it still exits with an error. Is that the designed behaviour?
This message is a reminder that Fedora 17 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 17. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '17'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 17's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 17 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior to Fedora 17's end of life. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. Thank you for reporting this bug and we are sorry it could not be fixed.