Bug 884911 - SELinux is preventing /usr/sbin/winbindd from 'write' accesses on the directory /var/cache.
Summary: SELinux is preventing /usr/sbin/winbindd from 'write' accesses on the directo...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:6df87b9fceb29153c82db8270dc...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-07 02:17 UTC by Eric Blake
Modified: 2012-12-18 06:55 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-18 06:55:24 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Eric Blake 2012-12-07 02:17:44 UTC
Description of problem:
I typed 'systemctl enable winbind && systemctl start winbind'
SELinux is preventing /usr/sbin/winbindd from 'write' accesses on the directory /var/cache.

*****  Plugin catchall_labels (83.8 confidence) suggests  ********************

If you want to allow winbindd to have write access on the cache directory
Then you need to change the label on /var/cache
Do
# semanage fcontext -a -t FILE_TYPE '/var/cache'
where FILE_TYPE is one of the following: var_log_t, ctdbd_var_lib_t, pcscd_var_run_t, samba_var_t, var_run_t, smbd_var_run_t, samba_etc_t, samba_log_t, user_home_dir_t, winbind_var_run_t, tmp_t, user_tmp_t, auth_cache_t, user_home_t. 
Then execute: 
restorecon -v '/var/cache'


*****  Plugin catchall (17.1 confidence) suggests  ***************************

If you believe that winbindd should be allowed write access on the cache directory 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 winbindd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:winbind_t:s0
Target Context                system_u:object_r:var_t:s0
Target Objects                /var/cache [ dir ]
Source                        winbindd
Source Path                   /usr/sbin/winbindd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           samba-winbind-4.0.0-170.fc18.rc6.x86_64
Target RPM Packages           filesystem-3.1-2.fc18.x86_64
Policy RPM                    selinux-policy-3.11.1-59.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.6.9-4.fc18.x86_64 #1 SMP Tue Dec
                              4 14:12:51 UTC 2012 x86_64 x86_64
Alert Count                   1
First Seen                    2012-12-06 19:14:53 MST
Last Seen                     2012-12-06 19:14:53 MST
Local ID                      ff64531d-5bad-4191-80cc-13b5e68d930f

Raw Audit Messages
type=AVC msg=audit(1354846493.173:435): avc:  denied  { write } for  pid=3625 comm="winbindd" name="cache" dev="dm-2" ino=13 scontext=system_u:system_r:winbind_t:s0 tcontext=system_u:object_r:var_t:s0 tclass=dir


type=SYSCALL msg=audit(1354846493.173:435): arch=x86_64 syscall=mkdir success=no exit=EACCES a0=25ce2a0 a1=1ed a2=0 a3=61 items=0 ppid=1 pid=3625 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=winbindd exe=/usr/sbin/winbindd subj=system_u:system_r:winbind_t:s0 key=(null)

Hash: winbindd,winbind_t,var_t,dir,write

audit2allow

#============= winbind_t ==============
#!!!! The source type 'winbind_t' can write to a 'dir' of the following types:
# var_log_t, ctdbd_var_lib_t, pcscd_var_run_t, samba_var_t, var_run_t, smbd_var_run_t, samba_etc_t, samba_log_t, user_home_dir_t, winbind_var_run_t, tmp_t, user_tmp_t, auth_cache_t, user_home_t

allow winbind_t var_t:dir write;

audit2allow -R

#============= winbind_t ==============
#!!!! The source type 'winbind_t' can write to a 'dir' of the following types:
# var_log_t, ctdbd_var_lib_t, pcscd_var_run_t, samba_var_t, var_run_t, smbd_var_run_t, samba_etc_t, samba_log_t, user_home_dir_t, winbind_var_run_t, tmp_t, user_tmp_t, auth_cache_t, user_home_t

allow winbind_t var_t:dir write;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.6.9-4.fc18.x86_64
type:           libreport

Comment 1 Daniel Walsh 2012-12-07 17:59:18 UTC
Fixed in selinux-policy-3.11.1-61.fc18.noarch

Comment 2 Fedora Update System 2012-12-11 17:52:20 UTC
selinux-policy-3.11.1-62.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-62.fc18

Comment 3 Fedora Update System 2012-12-11 23:29:01 UTC
Package selinux-policy-3.11.1-62.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.11.1-62.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-20203/selinux-policy-3.11.1-62.fc18
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2012-12-17 17:40:44 UTC
selinux-policy-3.11.1-66.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-66.fc18

Comment 5 Fedora Update System 2012-12-18 06:55:25 UTC
selinux-policy-3.11.1-66.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


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