Bug 835100 - policycoreutils: SELinux: Could not downgrade policy file /etc/selinux/targeted/policy/policy.27
policycoreutils: SELinux: Could not downgrade policy file /etc/selinux/targe...
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: policycoreutils (Show other bugs)
17
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
: Regression, Reopened, TestBlocker
Depends On:
Blocks: 905443 953347
  Show dependency treegraph
 
Reported: 2012-06-25 10:34 EDT by Ofer Schreiber
Modified: 2015-11-15 20:30 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-01 14:42:20 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Ofer Schreiber 2012-06-25 10:34:19 EDT
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
Comment 1 Ofer Schreiber 2012-06-25 10:40:01 EDT
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.
Comment 2 Juan Hernández 2012-06-25 11:01:00 EDT
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?
Comment 3 Daniel Walsh 2013-02-08 12:40:23 EST
I think this is fixed in the current release.
Comment 4 Juan Hernández 2013-02-08 13:08:10 EST
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
Comment 5 Daniel Walsh 2013-02-08 14:49:25 EST
Ok try:

policycoreutils-2.1.13-56.fc18
Comment 6 Juan Hernández 2013-02-11 02:35:32 EST
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
Comment 7 Daniel Walsh 2013-02-12 13:33:11 EST
Well that is better since the policycoreutils is no longer crashing.
Comment 8 Alex Lourie 2013-03-05 06:13:53 EST
(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?
Comment 9 Fedora End Of Life 2013-07-04 03:00:13 EDT
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.
Comment 10 Fedora End Of Life 2013-08-01 14:42:37 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.