Bug 1461044 - [SELINUX-RHEL6]statedump is not able to dump the file in /var/run/gluster because of SELinux permissions
Summary: [SELINUX-RHEL6]statedump is not able to dump the file in /var/run/gluster bec...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: samba
Version: rhgs-3.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: RHGS 3.3.0
Assignee: Michael Adam
QA Contact: Vivek Das
URL:
Whiteboard: rhel-fix
Depends On: 1462824
Blocks: 1417151
TreeView+ depends on / blocked
 
Reported: 2017-06-13 12:21 UTC by Vivek Das
Modified: 2017-09-25 11:22 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1461064 (view as bug list)
Environment:
Last Closed: 2017-09-25 11:22:43 UTC
Embargoed:


Attachments (Terms of Use)

Description Vivek Das 2017-06-13 12:21:28 UTC
Description of problem:

On a samba setup , if the statedump command is executed to collect the statedump on gfapi side , the file is not getting dumped to the location /var/run/gluster for RHEL6.

After setting the SELinux to permissive , it was able to dump.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Create a samba ctdb setup 
2. mount a volume, run some I/O's
3. Run statedump command as following and check for the file:

gluster volume statedump testvol client localhost:<smbd_pid>

Actual results:
The file is not getting dumped in default location due to SELINUX preventing smbd to access and write to /var/run/gluster.

Expected results:
statedump should get dumped in /var/run/gluster

Additional info:

type=AVC msg=audit(1497356412.330:397441): avc:  denied  { search } for  pid=29363 comm="smbd" name="gluster" dev=dm-0 ino=1178243 scontext=unconfined_u:system_r:smbd_t:s0 tcontext=system_u:object_r:glusterd_var_run_t:s0 tclass=dir
type=SYSCALL msg=audit(1497356412.330:397441): arch=c000003e syscall=2 success=no exit=-13 a0=7faca64bc170 a1=0 a2=1b6 a3=0 items=0 ppid=24626 pid=29363 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=50810 comm="smbd" exe="/usr/sbin/smbd" subj=unconfined_u:system_r:smbd_t:s0 key=(null)
type=AVC msg=audit(1497356412.331:397442): avc:  denied  { search } for  pid=29363 comm="smbd" name="gluster" dev=dm-0 ino=1178243 scontext=unconfined_u:system_r:smbd_t:s0 tcontext=system_u:object_r:glusterd_var_run_t:s0 tclass=dir
type=SYSCALL msg=audit(1497356412.331:397442): arch=c000003e syscall=2 success=no exit=-13 a0=7faca64bc170 a1=0 a2=1b6 a3=0 items=0 ppid=24626 pid=29363 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=50810 comm="smbd" exe="/usr/sbin/smbd" subj=unconfined_u:system_r:smbd_t:s0 key=(null)
type=AVC msg=audit(1497356412.331:397443): avc:  denied  { search } for  pid=29363 comm="smbd" name="gluster" dev=dm-0 ino=1178243 scontext=unconfined_u:system_r:smbd_t:s0 tcontext=system_u:object_r:glusterd_var_run_t:s0 tclass=dir
type=SYSCALL msg=audit(1497356412.331:397443): arch=c000003e syscall=2 success=no exit=-13 a0=7faca64be170 a1=c2 a2=180 a3=0 items=0 ppid=24626 pid=29363 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=50810 comm="smbd" exe="/usr/sbin/smbd" subj=unconfined_u:system_r:smbd_t:s0 key=(null)
type=AVC msg=audit(1497356412.331:397444): avc:  denied  { search } for  pid=29363 comm="smbd" name="gluster" dev=dm-0 ino=1178243 scontext=unconfined_u:system_r:smbd_t:s0 tcontext=system_u:object_r:glusterd_var_run_t:s0 tclass=dir

Comment 2 Vivek Das 2017-06-13 12:38:40 UTC
Version
-------
samba-4.6.3-2.el6rhs.x86_64
glusterfs-server-3.8.4-27.el6rhs.x86_64


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