Bug 1243931
Summary: | [SELinux]: geo-rep: Mount-Broker: umount of aux mount at slave is denied | |||
---|---|---|---|---|
Product: | [Red Hat Storage] Red Hat Gluster Storage | Reporter: | Rahul Hinduja <rhinduja> | |
Component: | geo-replication | Assignee: | Bug Updates Notification Mailing List <rhs-bugs> | |
Status: | CLOSED WONTFIX | QA Contact: | Rahul Hinduja <rhinduja> | |
Severity: | high | Docs Contact: | ||
Priority: | unspecified | |||
Version: | rhgs-3.1 | CC: | aavati, avishwan, csaba, mgrepl, mmalik, nlevinki, nsathyan, pprakash, rcyriac, vagarwal | |
Target Milestone: | --- | Keywords: | ZStream | |
Target Release: | RHGS 3.1.1 | |||
Hardware: | x86_64 | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1257883 (view as bug list) | Environment: | ||
Last Closed: | 2015-08-28 10:18:44 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: | 1245068, 1251815, 1257883 |
Description
Rahul Hinduja
2015-07-16 15:37:46 UTC
Ok we don't have #============= mount_t ============== #!!!! This avc is allowed in the current policy allow mount_t mnt_t:lnk_file read; in RHEL6. So try to with $cat mypol.te policy_module(mypol,1.0) require{ type mount_t; type mnt_t; } allow mount_t mnt_t:lnk_file read; Could you try following workaround without loading the policy module mentioned in comment#5? # chcon -R -t home_root_t /var/mountbroker-root # sesearch -s mount_t -t home_root_t -c lnk_file -p read -A -C Found 1 semantic av rules: allow mount_t home_root_t : lnk_file { read getattr } ; # (In reply to Milos Malik from comment #6) > Could you try following workaround without loading the policy module > mentioned in comment#5? > > # chcon -R -t home_root_t /var/mountbroker-root > # sesearch -s mount_t -t home_root_t -c lnk_file -p read -A -C > Found 1 semantic av rules: > allow mount_t home_root_t : lnk_file { read getattr } ; > > # [root@georep7 ~]# rpm -qa | grep selinux-policy selinux-policy-targeted-3.7.19-279.el6.noarch selinux-policy-3.7.19-279.el6.noarch [root@georep7 ~]# sesearch -s mount_t -t home_root_t -c lnk_file -p read -A -C Found 1 semantic av rules: allow mount_t home_root_t : lnk_file { read getattr } ; [root@georep7 ~]# [root@georep7 ~]# ls -dZ /var/mountbroker-root drwx--x--x. root root unconfined_u:object_r:home_root_t:s0 /var/mountbroker-root [root@georep7 ~]# [root@georep7 ~]# ls -Z /var/mountbroker-root drwx--x--x. root root unconfined_u:object_r:home_root_t:s0 mb_hive drwx------. geoaccount root unconfined_u:object_r:home_root_t:s0 user500 [root@georep7 ~]# I do not see avc denial after changing the context to home_root as: [root@georep7 ~]# cat /var/log/audit/audit.log|audit2allow #============= glusterd_t ============== allow glusterd_t showmount_exec_t:file execute; [root@georep7 ~]# grep -i "avc" /var/log/audit/audit.log | grep -v "showmount"[root@georep7 ~]# Since in the admin guide, we ask the user to create the directory ("/var/mountbroker-root" is just as example) with permission 0711. We can have additional step to change the context to home_root. This bug would be more of doc bug Thanks to Milos for providing solution. chcon is a temporary solution which restorecon can revert the context. Following 2 steps would be needed in the document after asking the user to create directory with 0711 permission 1. semanage fcontext -a -e /home /var/mountbroker-root 2. restorecon -Rv /var/mountbroker-root |