Bug 510952 - Could not load policy file /etc/selinux/targeted/policy/policy.24: Invalid argument
Could not load policy file /etc/selinux/targeted/policy/policy.24: Invalid a...
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
11
All Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-12 15:40 EDT by Jonathan Underwood
Modified: 2009-09-22 21:09 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-22 21:09:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jonathan Underwood 2009-07-12 15:40:56 EDT
Description of problem:
During a yum update:

Updating       : selinux-policy-targeted-3.6.12-62.fc11.noarch                                                              18/50 
SELinux:  Could not load policy file /etc/selinux/targeted/policy/policy.24:  Invalid argument
/usr/sbin/load_policy:  Can't load policy:  Invalid argument
libsemanage.semanage_reload_policy: load_policy returned error code 2.
semodule:  Failed!


Version-Release number of selected component (if applicable):
3.6.12-62.fc11

How reproducible:
Everytime

Steps to Reproduce:
1.Update selinux-policy-targetted
Comment 1 Jonathan Underwood 2009-07-12 19:15:07 EDT
Hmm.. interestingly I did a 

yum reinstall selinux-policy-targeted

shortly afterwards and that didn't through the error.

I am wondering if this is a problem with Presto - the initial install was from a package composed with the presto metadata, whereas the reinstall fetches the package afresh.
Comment 2 Daniel Walsh 2009-07-14 10:50:16 EDT
Is there a policy.23 file in /etc/selinux/targeted/policy?

Might be some kind of rpm dependency problem?
Comment 3 Jonathan Underwood 2009-07-14 11:17:45 EDT
(In reply to comment #2)
> Is there a policy.23 file in /etc/selinux/targeted/policy?
> 

There isn't presently, but I have no way of knowing if there was at the point of the package upgrade. 

> Might be some kind of rpm dependency problem?  

I don't quite follow here, but the whole issue is a bit baffling to me.
Comment 4 Daniel Walsh 2009-07-14 11:33:32 EDT
If selinux-policy did not required all of the correct versions of packages before executing the policy build, you could see something like this happen.

After the install was complete the policy package could update.
Comment 5 Daniel Walsh 2009-07-14 11:34:09 EDT
Jeremy any ideas?
Comment 6 Sergei LITVINENKO 2009-08-26 16:35:36 EDT
fedora-12-alpha-i386 after update can boot.

Disabling SELinux help
Reinstall selinux-policy-targeted do not help. 

File policy.23 there is not in /etc/selinux/targeted/policy. There is policy.24

Re-installing of packet selinux-policy-targeted restore /etc/selinux/targeted/policy/policy.24, even if it is deleted.
Comment 7 Sergei LITVINENKO 2009-08-26 16:38:03 EDT
>> fedora-12-alpha-i386 after update can boot.
>>

Can boot in single mode only.
Comment 8 Daniel Walsh 2009-08-26 17:56:12 EDT
Segei, maybe rebuild your initrd.
Comment 9 Orion Poplawski 2009-09-21 18:02:02 EDT
Seeing this in fresh rawhide install log:

Installing selinux-policy-targeted-3.6.32-7.fc12.noarch
SELinux:  Could not load policy file /etc/selinux/targeted/policy/policy.24:  Invalid argument
/sbin/load_policy:  Can't load policy:  Invalid argument
libsemanage.semanage_reload_policy: load_policy returned error code 2.
libsemanage.semanage_install_active: Could not copy /etc/selinux/targeted/modules/active/policy.kern to /etc/selinux/targeted/policy/policy.24. (No such file or directory).
semodule:  Failed!


ls -lZ /etc/selinux/targeted/policy/policy.*
-rw-r--r--. root root system_u:object_r:semanage_store_t:s0 /etc/selinux/targeted/policy/policy.24
Comment 10 Daniel Walsh 2009-09-21 22:52:11 EDT
Could you make sure you have the latest libsemanage and policycoreutils installed.
Comment 11 Orion Poplawski 2009-09-22 17:05:40 EDT
No error message with installing today's rawhide.

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