Bug 835100 - policycoreutils: SELinux: Could not downgrade policy file /etc/selinux/targeted/policy/policy.27
Summary: policycoreutils: SELinux: Could not downgrade policy file /etc/selinux/targe...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: policycoreutils
Version: 17
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 905443 953347
TreeView+ depends on / blocked
 
Reported: 2012-06-25 14:34 UTC by Ofer Schreiber
Modified: 2015-11-16 01:30 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-08-01 18:42:20 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ofer Schreiber 2012-06-25 14:34:19 UTC
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 14:40:01 UTC
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 15:01:00 UTC
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 17:40:23 UTC
I think this is fixed in the current release.

Comment 4 Juan Hernández 2013-02-08 18:08:10 UTC
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 19:49:25 UTC
Ok try:

policycoreutils-2.1.13-56.fc18

Comment 6 Juan Hernández 2013-02-11 07:35:32 UTC
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 18:33:11 UTC
Well that is better since the policycoreutils is no longer crashing.

Comment 8 Alex Lourie 2013-03-05 11:13:53 UTC
(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 07:00:13 UTC
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 18:42:37 UTC
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.