Bug 700851

Summary: SELinux is preventing /usr/libexec/telepathy-gabble from read, write access on the file /home/adrin/.cache/dconf/user.
Product: [Fedora] Fedora Reporter: Adrin Jalali <adrin.jalali>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: adrin.jalali, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:b951c233eafeb3904b5ddbfe106e37a6ab7b61eb9d9043461a56cb64f753e339
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-29 17:15:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Adrin Jalali 2011-04-29 15:32:54 UTC
SELinux is preventing /usr/libexec/telepathy-gabble from read, write access on the file /home/adrin/.cache/dconf/user.

*****  Plugin restorecon (94.8 confidence) suggests  *************************

If you want to fix the label. 
/home/adrin/.cache/dconf/user default label should be cache_home_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /home/adrin/.cache/dconf/user

*****  Plugin catchall_labels (5.21 confidence) suggests  ********************

If you want to allow telepathy-gabble to have read write access on the user file
Then you need to change the label on /home/adrin/.cache/dconf/user
Do
# semanage fcontext -a -t FILE_TYPE '/home/adrin/.cache/dconf/user'
where FILE_TYPE is one of the following: user_cron_spool_t, afs_cache_t, telepathy_gabble_t, telepathy_gabble_cache_home_t. 
Then execute: 
restorecon -v '/home/adrin/.cache/dconf/user'


*****  Plugin catchall (1.44 confidence) suggests  ***************************

If you believe that telepathy-gabble should be allowed read write access on the user 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 telepathy-gabbl /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:telepathy_gabble_t:s0-s0
                              :c0.c1023
Target Context                unconfined_u:object_r:mnt_t:s0
Target Objects                /home/adrin/.cache/dconf/user [ file ]
Source                        telepathy-gabbl
Source Path                   /usr/libexec/telepathy-gabble
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           telepathy-gabble-0.12.0-1.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-18.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.38.3-18.fc15.x86_64 #1 SMP
                              Fri Apr 22 13:24:23 UTC 2011 x86_64 x86_64
Alert Count                   2
First Seen                    Fri 29 Apr 2011 02:42:20 PM IRDT
Last Seen                     Fri 29 Apr 2011 06:04:33 PM IRDT
Local ID                      82a1d4d2-14d6-453f-bf8a-2547e43ef13f

Raw Audit Messages
type=AVC msg=audit(1304084073.875:66): avc:  denied  { read write } for  pid=1888 comm="telepathy-gabbl" name="user" dev=sda6 ino=3810567 scontext=unconfined_u:unconfined_r:telepathy_gabble_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:mnt_t:s0 tclass=file


type=SYSCALL msg=audit(1304084073.875:66): arch=x86_64 syscall=open success=no exit=EACCES a0=29c66d0 a1=42 a2=180 a3=7fff0e832d60 items=0 ppid=1 pid=1888 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm=telepathy-gabbl exe=/usr/libexec/telepathy-gabble subj=unconfined_u:unconfined_r:telepathy_gabble_t:s0-s0:c0.c1023 key=(null)

Hash: telepathy-gabbl,telepathy_gabble_t,mnt_t,file,read,write

audit2allow

#============= telepathy_gabble_t ==============
allow telepathy_gabble_t mnt_t:file { read write };

audit2allow -R

#============= telepathy_gabble_t ==============
allow telepathy_gabble_t mnt_t:file { read write };

Comment 1 Daniel Walsh 2011-04-29 16:44:52 UTC
Why is the /home/adrin/.cache/dconf/user file labeled mnt_t?

restorecon -R -v /home/adrin

Should fix the labels.

Comment 2 Daniel Walsh 2011-04-29 16:45:15 UTC
*** Bug 700852 has been marked as a duplicate of this bug. ***

Comment 3 Daniel Walsh 2011-04-29 16:45:51 UTC
*** Bug 700854 has been marked as a duplicate of this bug. ***

Comment 4 Daniel Walsh 2011-04-29 16:47:13 UTC
Is your entire homedir labeled mnt_t?

ls -ldZ /home/adrin

Comment 5 Adrin Jalali 2011-04-29 16:57:13 UTC
it was:

$ ls -ldZ /home/adrin
drwxr-xr-x. adrin adrin unconfined_u:object_r:user_home_dir_t:s0 /home/adrin


then I ran the command you gave.

Maybe it was because I made a backup of my home folder and copied it into the new one after migration.

Comment 6 Daniel Walsh 2011-04-29 17:15:57 UTC
If you copied it over and mv'd it back, I guess this would happen.