Bug 1287877 - glusterfs does not allow passing standard SElinux mount options to fuse
Summary: glusterfs does not allow passing standard SElinux mount options to fuse
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: scripts
Version: 3.7.6
Hardware: x86_64
OS: All
high
high
Target Milestone: ---
Assignee: Manikandan
QA Contact:
URL:
Whiteboard:
Depends On: 1287763
Blocks: glusterfs-3.7.7
TreeView+ depends on / blocked
 
Reported: 2015-12-02 22:09 UTC by Niels de Vos
Modified: 2016-09-20 04:28 UTC (History)
4 users (show)

Fixed In Version: glusterfs-3.7.7
Doc Type: Bug Fix
Doc Text:
Clone Of: 1287763
Environment:
Last Closed: 2016-02-16 08:53:43 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Niels de Vos 2015-12-02 22:09:09 UTC
+++ This bug was initially created as a clone of Bug #1287763 +++
+++                                                           +++
+++ Use this bug to packport a fix to release-3.7             +++

Description of problem:

With older versions of gluster, say 3.5.3, glusterfs supports setting selinux context over fuse.glusterfs mountpoint. After 3.6.1, it throws an error : "Invalid option: context". 

The problem is because of a change in mount.glusterfs script. With older versions, it works fine.

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


How reproducible:
Always in versions from 3.6

Steps to Reproduce:
http://www.gluster.org/pipermail/gluster-users.old/2015-January/020014.html

Actual results:
It throws an error "Invalid option: context"

Expected results:
Inform FUSE that the glusterfs sub-filesystem supports SElinux while passing mount options and allow to set selinux context over the mountpoint.


Additional info:

When you set selinux context, the same can be verfied in /proc/mounts:

vm1:sel /qwe1 fuse.glusterfs rw,context=system_u:object_r:user_home_t:s0,relatime,user_id=0,group_id=0,default_    permissions,allow_other,max_read=131072 0 0

--- Additional comment from Vijay Bellur on 2015-12-02 21:56:01 CET ---

REVIEW: http://review.gluster.org/12858 (fuse: pass default SElinux mount options on to the kernel) posted (#1) for review on master by Niels de Vos (ndevos)

Comment 1 Vijay Bellur 2015-12-03 11:04:13 UTC
REVIEW: http://review.gluster.org/12870 (fuse: pass default SElinux mount options on to the kernel) posted (#1) for review on release-3.7 by Manikandan Selvaganesh (mselvaga)

Comment 2 Vijay Bellur 2015-12-03 17:59:28 UTC
COMMIT: http://review.gluster.org/12870 committed in release-3.7 by Niels de Vos (ndevos) 
------
commit 21b32ba1430e4a0e664423a4a7bf038a2da428bc
Author: Niels de Vos <ndevos>
Date:   Wed Dec 2 21:19:56 2015 +0100

    fuse: pass default SElinux mount options on to the kernel
    
    In order to set default SElinux contexts on a Gluster mount, the
    standard SElinux mount options need to be passed to the kernel. The
    mount(8) manual page lists "context", "fscontext", "defcontext" and
    "rootcontext" as valid options.
    
            Backport of http://review.gluster.org/#/c/12858/
    
    Cherry-picked from commit 5e81233f0a3c153e03c437a164ac2ca21314bdec
    > BUG: 1287763
    > Change-Id: I015fe27e4c6ff36a030e3480b23141aca2d91fc2
    > Signed-off-by: Niels de Vos <ndevos>
    > Reviewed-on: http://review.gluster.org/12858
    > Tested-by: NetBSD Build System <jenkins.org>
    > Tested-by: Gluster Build System <jenkins.com>
    > Reviewed-by: Humble Devassy Chirammal <humble.devassy>
    > Reviewed-by: Manikandan Selvaganesh <mselvaga>
    > Signed-off-by: Manikandan Selvaganesh <mselvaga>
    
    BUG: 1287877
    Change-Id: I015fe27e4c6ff36a030e3480b23141aca2d91fc2
    Signed-off-by: Manikandan Selvaganesh <mselvaga>
    Reviewed-on: http://review.gluster.org/12870
    Reviewed-by: Niels de Vos <ndevos>
    Tested-by: NetBSD Build System <jenkins.org>
    Tested-by: Gluster Build System <jenkins.com>

Comment 3 Kaushal 2016-04-19 07:49:44 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.7, please open a new bug report.

glusterfs-3.7.7 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] https://www.gluster.org/pipermail/gluster-users/2016-February/025292.html
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


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