Bug 750770 - SELinux is preventing systemd-readahe from 'unlink' accesses on the fichier .readahead.
Summary: SELinux is preventing systemd-readahe from 'unlink' accesses on the fichier ....
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 15
Hardware: i386
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:81e81e1f50e...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-02 10:50 UTC by John Mev
Modified: 2011-11-04 07:33 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-02 15:12:47 UTC
Type: ---


Attachments (Terms of Use)

Description John Mev 2011-11-02 10:50:59 UTC
SELinux is preventing systemd-readahe from 'unlink' accesses on the fichier .readahead.

*****  Plugin file (36.8 confidence) suggests  *******************************

If you think this is caused by a badly mislabeled machine.
Then you need to fully relabel.
Do
touch /.autorelabel; reboot

*****  Plugin file (36.8 confidence) suggests  *******************************

If you think this is caused by a badly mislabeled machine.
Then you need to fully relabel.
Do
touch /.autorelabel; reboot

*****  Plugin catchall_labels (23.2 confidence) suggests  ********************

If vous souhaitez autoriser systemd-readahe à accéder à unlink sur .readahead file
Then you need to change the label on .readahead
Do
# semanage fcontext -a -t FILE_TYPE '.readahead'
where FILE_TYPE is one of the following: etc_runtime_t, readahead_var_lib_t, readahead_var_run_t, root_t. 
Then execute: 
restorecon -v '.readahead'


*****  Plugin catchall (5.04 confidence) suggests  ***************************

If you believe that systemd-readahe should be allowed unlink access on the .readahead file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep systemd-readahe /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:readahead_t:s0
Target Context                system_u:object_r:file_t:s0
Target Objects                .readahead [ file ]
Source                        systemd-readahe
Source Path                   systemd-readahe
Port                          <Inconnu>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-44.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 2.6.40.6-0.fc15.i686.PAE
                              #1 SMP Tue Oct 4 00:44:38 UTC 2011 i686 i686
Alert Count                   1
First Seen                    mer. 02 nov. 2011 10:39:31 CET
Last Seen                     mer. 02 nov. 2011 10:39:31 CET
Local ID                      3051511d-71c3-4c79-a9e4-857743ce5203

Raw Audit Messages
type=AVC msg=audit(1320226771.636:50): avc:  denied  { unlink } for  pid=488 comm="systemd-readahe" name=".readahead" dev=sdb12 ino=3286 scontext=system_u:system_r:readahead_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file


Hash: systemd-readahe,readahead_t,file_t,file,unlink

audit2allow

#============= readahead_t ==============
allow readahead_t file_t:file unlink;

audit2allow -R

#============= readahead_t ==============
allow readahead_t file_t:file unlink;

Comment 1 Miroslav Grepl 2011-11-02 12:50:47 UTC
Where is .readahead located? Did you add a new disk?

Comment 2 Daniel Walsh 2011-11-02 15:12:35 UTC
file_t means that the file has no label if you added a new disk, you need to place labels on it,  restorecon -r -v PATHTODISK will do this.

touch /.autorelebel; reboot

Will place labels oll over the disk.  If the .readahed file is on /tmp, you should just remove it.

Comment 3 John Mev 2011-11-03 07:54:44 UTC
No I didn't add any disk, but I just changed and format a partition ton reinstall a backup of F 15.

So I just need to autorelabel ?

thx

Comment 4 Daniel Walsh 2011-11-03 14:56:54 UTC
Yes

Comment 5 John Mev 2011-11-04 07:33:47 UTC
I'll do it

thx


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