Bug 1191989
Summary: | [HC] selinux denials running glusterd | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Sandro Bonazzola <sbonazzo> | ||||||||
Component: | selinux-policy | Assignee: | Lukas Vrabec <lvrabec> | ||||||||
Status: | CLOSED ERRATA | QA Contact: | Milos Malik <mmalik> | ||||||||
Severity: | medium | Docs Contact: | Bara Ancincova <bancinco> | ||||||||
Priority: | high | ||||||||||
Version: | 7.1 | CC: | lvrabec, mgrepl, mmalik, plautrba, pvrabec, sbonazzo, ssekidde, ylavi | ||||||||
Target Milestone: | rc | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | All | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | gluster | ||||||||||
Fixed In Version: | selinux-policy-3.13.1-26.el7 | Doc Type: | Bug Fix | ||||||||
Doc Text: |
SELinux policy for Red Hat Gluster Storage has been added
Previously, SELinux policy for Red Hat Gluster Storage (RHGS) components was missing, and Gluster worked correctly only when SELinux was in permissive mode. With this update, SELinux policy rules for the *glusterd* (glusterFS Management Service), *glusterfsd* (NFS sever), *smbd*, *nfsd*, *rpcd*, adn *ctdbd* processes have been updated providing SELinux support for Gluster.
|
Story Points: | --- | ||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2015-11-19 10:26:09 UTC | Type: | Bug | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Bug Depends On: | |||||||||||
Bug Blocks: | 996870 | ||||||||||
Attachments: |
|
Description
Sandro Bonazzola
2015-02-12 10:59:34 UTC
What is the full path to S31ganesha-set.sh and S30samba-set.sh files? Which package do they come from? Please provide the selinux-policy-targeted version too. Are there other SELinux denials on your machine? # ausearch -m avc -m user_avc -m selinux_err -i -ts today Created attachment 990893 [details] ausearch -m avc -m user_avc -m selinux_err -i -ts today (In reply to Milos Malik from comment #1) > What is the full path to S31ganesha-set.sh and S30samba-set.sh files? # locate S31ganesha-set.sh S30samba-set.sh /var/lib/glusterd/hooks/1/set/post/S30samba-set.sh /var/lib/glusterd/hooks/1/set/post/S31ganesha-set.sh > Which package do they come from? # rpm -qf \ /var/lib/glusterd/hooks/1/set/post/S30samba-set.sh \ /var/lib/glusterd/hooks/1/set/post/S31ganesha-set.sh glusterfs-server-3.6.2-1.el7.x86_64 glusterfs-server-3.6.2-1.el7.x86_64 > Please provide the selinux-policy-targeted version too. # rpm -qv selinux-policy-targeted selinux-policy-targeted-3.13.1-23.el7.noarch (In reply to Milos Malik from comment #2) > Are there other SELinux denials on your machine? > > # ausearch -m avc -m user_avc -m selinux_err -i -ts today See the attachment Could you re-run your scenario in permissive mode and attach those AVCs too? # setenforce 0 # your scenario # setenforce 1 Created attachment 990972 [details] setenforce 0 ; scenario; ausearch -m avc -m user_avc -m selinux_err -i -ts today (In reply to Milos Malik from comment #5) > Could you re-run your scenario in permissive mode and attach those AVCs too? > > # setenforce 0 > # your scenario > # setenforce 1 See attached output Could you try to label them as bin_t and re-test it? #chcon -t bin_t /var/lib/glusterd/hooks/1/set/post/S30samba-set.sh #chcon -t bin_t /var/lib/glusterd/hooks/1/set/post/S31ganesha-set.sh Created attachment 1018453 [details]
fresh ausearch output
Miroslav, it works better if you set a needinfo on me :-) I'll try again applying your changes in comment #8. In the meanwhile, can you take a look at attachment in comment #9 ? It's a fresh output from ausearch -m avc from today on the same kind of deployment I was trying when I opened this bug. I'd also suggest this for inclusion in 7.1.z. Based on AVCs in the last attachment: * glusterd wants to access /dev/random * glusterd wants to execute various shell scripts under /var/lib/glusterd/hooks * dhclient wants to access /run/dhclient-ovirtmgmt.pid file * sanlock wants to access a symbolic link somewhere under /run/libvirt/ (In reply to Miroslav Grepl from comment #8) > Could you try to label them as bin_t and re-test it? > > #chcon -t bin_t /var/lib/glusterd/hooks/1/set/post/S30samba-set.sh > #chcon -t bin_t /var/lib/glusterd/hooks/1/set/post/S31ganesha-set.sh above commands solve the issue reported in comment #0 Do you need another BZ for the denials in comment #9? $ matchpathcon /var/lib/glusterd/hooks/*/*.sh /var/lib/glusterd/hooks/*/*.sh system_u:object_r:bin_t:s0 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-2300.html |