Bug 1198406

Summary: SELinux is preventing /usr/sbin/glusterfsd from 'execute' accesses on the file /var/lib/glusterd/hooks/1/start/post/S30samba-start.sh.
Product: [Fedora] Fedora Reporter: Joe Julian <joe>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: dominick.grift, dwalsh, lvrabec, mgrepl, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:df9217d69acb2c32cb3d3fa768ac5ca7c45e079fd8f51e937fb3d67980f42437
Fixed In Version: selinux-policy-3.13.1-105.6.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-21 04:50:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joe Julian 2015-03-04 02:10:33 UTC
Description of problem:
1. create a glusterfs volume, ie. gluster volume create myvol1
server1:/data/brick1 server2:/data/brick1
2. start the volume: gluster volume start myvol1
SELinux is preventing /usr/sbin/glusterfsd from 'execute' accesses on the file /var/lib/glusterd/hooks/1/start/post/S30samba-start.sh.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that glusterfsd should be allowed execute access on the S30samba-start.sh 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 glusterd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:glusterd_t:s0
Target Context                system_u:object_r:glusterd_var_lib_t:s0
Target Objects                /var/lib/glusterd/hooks/1/start/post/S30samba-
                              start.sh [ file ]
Source                        glusterd
Source Path                   /usr/sbin/glusterfsd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           glusterfs-3.6.2-1.fc21.x86_64
Target RPM Packages           glusterfs-server-3.6.2-1.fc21.x86_64
Policy RPM                    selinux-policy-3.13.1-105.3.fc21.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.17.8-300.fc21.x86_64 #1 SMP Thu
                              Jan 8 23:32:49 UTC 2015 x86_64 x86_64
Alert Count                   2
First Seen                    2015-03-03 17:51:38 PST
Last Seen                     2015-03-03 17:51:38 PST
Local ID                      981f0f06-dbae-47f3-ac64-58819a9790ea

Raw Audit Messages
type=AVC msg=audit(1425433898.395:109824): avc:  denied  { execute } for  pid=21975 comm="glusterd" name="S30samba-start.sh" dev="dm-2" ino=67162002 scontext=system_u:system_r:glusterd_t:s0 tcontext=system_u:object_r:glusterd_var_lib_t:s0 tclass=file permissive=0


type=SYSCALL msg=audit(1425433898.395:109824): arch=x86_64 syscall=execve success=no exit=EACCES a0=7fc908008c70 a1=7fc908008a40 a2=7fc92af11940 a3=8 items=0 ppid=2164 pid=21975 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=glusterd exe=/usr/sbin/glusterfsd subj=system_u:system_r:glusterd_t:s0 key=(null)

Hash: glusterd,glusterd_t,glusterd_var_lib_t,file,execute

Version-Release number of selected component:
selinux-policy-3.13.1-105.3.fc21.noarch

Additional info:
reporter:       libreport-2.3.0
hashmarkername: setroubleshoot
kernel:         3.17.8-300.fc21.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2015-03-05 19:11:35 UTC
commit bf82cd3fc352cb4f12b758424722baa3c719af75
Author: Lukas Vrabec <lvrabec>
Date:   Thu Mar 5 19:56:28 2015 +0100

    Allow glusterd_t exec glusterd_var_lib_t files. BZ(1198406)

Comment 2 Fedora Update System 2015-03-06 22:28:12 UTC
selinux-policy-3.13.1-105.6.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/selinux-policy-3.13.1-105.6.fc21

Comment 3 Fedora Update System 2015-03-09 08:33:55 UTC
Package selinux-policy-3.13.1-105.6.fc21:
* should fix your issue,
* was pushed to the Fedora 21 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.13.1-105.6.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-3476/selinux-policy-3.13.1-105.6.fc21
then log in and leave karma (feedback).

Comment 4 Miroslav Grepl 2015-03-17 15:57:20 UTC
Is this created on the fly?

Comment 5 Fedora Update System 2015-03-21 04:50:15 UTC
selinux-policy-3.13.1-105.6.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.