Bug 732661 - SELinux is preventing /usr/sbin/restorecond from 'relabelfrom' accesses on the fichier /home/jeanpaul/.gtk-bookmarks.
Summary: SELinux is preventing /usr/sbin/restorecond from 'relabelfrom' accesses on th...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 14
Hardware: i386
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:41198428e82...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-23 08:50 UTC by lazeroptyx
Modified: 2011-08-23 10:50 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-23 09:02:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description lazeroptyx 2011-08-23 08:50:25 UTC
SELinux is preventing /usr/sbin/restorecond from 'relabelfrom' accesses on the fichier /home/jeanpaul/.gtk-bookmarks.

*****  Plugin restorecon (99.5 confidence) suggests  *************************

If you want to fix the label. 
/home/jeanpaul/.gtk-bookmarks default label should be user_home_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /home/jeanpaul/.gtk-bookmarks

*****  Plugin catchall (1.49 confidence) suggests  ***************************

If you believe that restorecond should be allowed relabelfrom access on the .gtk-bookmarks 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 restorecond /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:system_r:abrt_helper_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:user_home_dir_t:s0
Target Objects                /home/jeanpaul/.gtk-bookmarks [ file ]
Source                        restorecond
Source Path                   /usr/sbin/restorecond
Port                          <Inconnu>
Host                          (removed)
Source RPM Packages           policycoreutils-2.0.85-28.fc14
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-44.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 2.6.35.13-92.fc14.i686.PAE #1 SMP Sat
                              May 21 17:33:09 UTC 2011 i686 i686
Alert Count                   1
First Seen                    mar. 23 août 2011 10:44:24 CEST
Last Seen                     mar. 23 août 2011 10:44:24 CEST
Local ID                      85a0d331-377b-41ce-ab4a-647267ddd89e

Raw Audit Messages
type=AVC msg=audit(1314089064.513:130): avc:  denied  { relabelfrom } for  pid=1871 comm="restorecond" name=".gtk-bookmarks" dev=sda8 ino=649101 scontext=unconfined_u:system_r:abrt_helper_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_dir_t:s0 tclass=file


type=AVC msg=audit(1314089064.513:130): avc:  denied  { relabelto } for  pid=1871 comm="restorecond" name=".gtk-bookmarks" dev=sda8 ino=649101 scontext=unconfined_u:system_r:abrt_helper_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file


type=SYSCALL msg=audit(1314089064.513:130): arch=i386 syscall=lsetxattr success=yes exit=0 a0=221b828 a1=74a023 a2=21eaf98 a3=25 items=0 ppid=1687 pid=1871 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm=restorecond exe=/usr/sbin/restorecond subj=unconfined_u:system_r:abrt_helper_t:s0-s0:c0.c1023 key=(null)

Hash: restorecond,abrt_helper_t,user_home_dir_t,file,relabelfrom

audit2allow

#============= abrt_helper_t ==============
#!!!! This avc is allowed in the current policy

allow abrt_helper_t user_home_dir_t:file relabelfrom;
#!!!! This avc is allowed in the current policy

allow abrt_helper_t user_home_t:file relabelto;

audit2allow -R

#============= abrt_helper_t ==============
#!!!! This avc is allowed in the current policy

allow abrt_helper_t user_home_dir_t:file relabelfrom;
#!!!! This avc is allowed in the current policy

allow abrt_helper_t user_home_t:file relabelto;

Comment 1 Miroslav Grepl 2011-08-23 09:02:14 UTC
Did you change the label on restorecond?

what does

# ls -Z /usr/sbin/restorecond

# matchpathcon /usr/sbin/restorecond

show?

You probably will need to execute

# restorecon -R -v /usr/sbin/restorecond

Comment 2 lazeroptyx 2011-08-23 09:27:53 UTC
>>> Did you change the label on restorecond?

No. AFTER getting the alert, I did the thing below, as suggested by the GUI tool:
root# grep restorecond /var/log/audit/audit.log | audit2allow -M mypol
root# semodule -i mypol.pp

Seemed to work.

root# ls -Z /usr/sbin/restorecond
-rwxr-xr-x. root root system_u:object_r:restorecond_exec_t:s0 /usr/sbin/restorecond
root# 

root# matchpathcon /usr/sbin/restorecond
/usr/sbin/restorecond	system_u:object_r:restorecond_exec_t:s0

root# ls -Z /usr/sbin/restorecond
-rwxr-xr-x. root root system_u:object_r:restorecond_exec_t:s0 /usr/sbin/restorecond
root# 
root# restorecon -R -v /usr/sbin/restorecond
root# ls -Z /usr/sbin/restorecond
-rwxr-xr-x. root root system_u:object_r:restorecond_exec_t:s0 /usr/sbin/restorecond
root#

NOTE:
I have 304 SE alerts and counting. Something must have gone horribly wrong.
I have tried 'touch /.relabel ; reboot'
to no avail. Any other way to reset this whole thing ?
I am not conversant with Selinux.

Comment 3 Miroslav Grepl 2011-08-23 10:50:13 UTC
Ok, please try to execute

# yum reinstall selinux-policy-targeted

and make sure nothing blows up on reinstall.


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