Bug 700854

Summary: SELinux is preventing /usr/libexec/mission-control-5 from 'read' accesses on the file /home/adrin/.mission-control/accounts/accounts.cfg.
Product: [Fedora] Fedora Reporter: Adrin Jalali <adrin.jalali>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:08cb63afc0a1ce0cf17868d1dc6514c7cb9b5c6f67eb47d888c27609ec230bdd
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-29 16:45:50 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:37:27 UTC
SELinux is preventing /usr/libexec/mission-control-5 from 'read' accesses on the file /home/adrin/.mission-control/accounts/accounts.cfg.

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

If you want to fix the label. 
/home/adrin/.mission-control/accounts/accounts.cfg default label should be telepathy_mission_control_home_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /home/adrin/.mission-control/accounts/accounts.cfg

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

If you want to allow mission-control-5 to have read access on the accounts.cfg file
Then you need to change the label on /home/adrin/.mission-control/accounts/accounts.cfg
Do
# semanage fcontext -a -t FILE_TYPE '/home/adrin/.mission-control/accounts/accounts.cfg'
where FILE_TYPE is one of the following: user_cron_spool_t, locale_t, sysctl_crypto_t, samba_var_t, proc_t, net_conf_t, gconf_home_t, abrt_t, lib_t, afs_cache_t, abrt_helper_exec_t, telepathy_mission_control_exec_t, telepathy_mission_control_home_t, ld_so_t, textrel_shlib_t, cert_t, rpm_script_tmp_t, telepathy_mission_control_cache_home_t, usr_t, sssd_public_t, etc_t, net_conf_t, ld_so_cache_t, krb5_conf_t, telepathy_mission_control_t, cache_home_t, cert_t, abrt_var_run_t, data_home_t, net_conf_t, cert_t. 
Then execute: 
restorecon -v '/home/adrin/.mission-control/accounts/accounts.cfg'


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

If you believe that mission-control-5 should be allowed read access on the accounts.cfg 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 mission-control /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:telepathy_mission_contro
                              l_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:mnt_t:s0
Target Objects                /home/adrin/.mission-control/accounts/accounts.cfg
                              [ file ]
Source                        mission-control
Source Path                   /usr/libexec/mission-control-5
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           telepathy-mission-control-5.7.9-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                   1
First Seen                    Fri 29 Apr 2011 02:41:38 PM IRDT
Last Seen                     Fri 29 Apr 2011 02:41:38 PM IRDT
Local ID                      cce7b8f6-a88a-4b60-a4c1-317a69c5243f

Raw Audit Messages
type=AVC msg=audit(1304071898.759:56): avc:  denied  { read } for  pid=1762 comm="mission-control" name="accounts.cfg" dev=sda6 ino=3801639 scontext=unconfined_u:unconfined_r:telepathy_mission_control_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:mnt_t:s0 tclass=file


type=SYSCALL msg=audit(1304071898.759:56): arch=x86_64 syscall=open success=no exit=EACCES a0=214f260 a1=0 a2=0 a3=1 items=0 ppid=1761 pid=1762 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm=mission-control exe=/usr/libexec/mission-control-5 subj=unconfined_u:unconfined_r:telepathy_mission_control_t:s0-s0:c0.c1023 key=(null)

Hash: mission-control,telepathy_mission_control_t,mnt_t,file,read

audit2allow

#============= telepathy_mission_control_t ==============
allow telepathy_mission_control_t mnt_t:file read;

audit2allow -R

#============= telepathy_mission_control_t ==============
allow telepathy_mission_control_t mnt_t:file read;

Comment 1 Daniel Walsh 2011-04-29 16:45:50 UTC

*** This bug has been marked as a duplicate of bug 700851 ***