Bug 274361 - selinux blocks swapon when called from /etc/rc.d/rc.sysinit
Summary: selinux blocks swapon when called from /etc/rc.d/rc.sysinit
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 7
Hardware: All
OS: Linux
medium
urgent
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-09-02 08:26 UTC by Bill C. Riemers
Modified: 2008-01-30 19:18 UTC (History)
0 users

Fixed In Version: Current
Clone Of:
Environment:
Last Closed: 2008-01-30 19:18:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Bill C. Riemers 2007-09-02 08:26:37 UTC
Description of problem:

For the past few weeks, my swap has not been activating when booting.   I
checked the log files, and found the following error:

SELinux: initialized (dev dm-1, type ext3), uses xattr
audit(1188719417.651:4): avc:  denied  { execute } for  pid=1702 comm="swapon"
name="mkswap" dev=dm-2 ino=459103 scontext=system_u:system_r:fsadm_t:s0
tcontext=system_u:object_r:bin_t:s0 tclass=file


Version-Release number of selected component (if applicable):


How reproducible:

Every reboot.

Steps to Reproduce:
I am not sure what initially caused this to start happening.  Once it does
happen, only one thing is need to make it happen again.
1. reboot
2. examine /var/log/dmesg
3.
  
Actual results:

Boot appears to proceed normally, but after logging in I find my swap partition
has not been activated.  Manually running "sudo swapon -a" works normally.

Expected results:

Swap should be activated at boot without an SELinux error.

Additional info:

Comment 1 Bill C. Riemers 2007-09-02 08:48:13 UTC
After further examination, I think this problem is related to the fact swapon
will automatically call mkswap if the swap device contains hibernate
information.  In other words a policy is needed for swapon to allow it to call
mkswap so swap can be loaded after a failed hibernate restore.

Bill


Comment 2 Daniel Walsh 2007-09-04 14:59:27 UTC
Fixed in selinux-policy-2.6.4-41.fc7.src.rpm


Comment 3 Daniel Walsh 2008-01-30 19:18:22 UTC
Bulk closing all bugs in Fedora updates in the modified state.  If you bug is
not fixed, please reopen.


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