Bug 1230671 - SELinux not supported with FUSE client
Summary: SELinux not supported with FUSE client
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: GlusterFS
Classification: Community
Component: fuse
Version: mainline
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Csaba Henk
QA Contact:
URL:
Whiteboard:
: 1596918 (view as bug list)
Depends On: 1272868 1291606 1318100 1683899
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-11 10:32 UTC by Vladimir Mitiouchev
Modified: 2019-02-28 04:13 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-20 09:09:22 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Vladimir Mitiouchev 2015-06-11 10:32:22 UTC
GlusterFS with native FUSE client doesn't support xattr / SELinux labeling.

Steps to Reproduce:
1. mount -t glusterfs -o selinux host:/gv1 /gv1
2. chcon -t default_t /gv1/input.txt 

Actual results:
chcon: failed to change context of /gv1/input.txt to system_u:object_r:default_t:s0: Operation not supported

Expected results:
no error

Additional info:
SELinux is running in Permissive mode.

Comment 1 Joe Julian 2015-10-28 18:46:37 UTC
Attempting to duplicate this by setting the security.selinux attribute using setfattr, the attribute call never makes it to glusterfs. It appears this must be being blocked in the kernel fuse module.

Comment 2 Niels de Vos 2015-10-29 08:35:49 UTC
This is not an issue that glusterfs-fuse can solve. SElinux in the kernel needs to detect if the filesystem supports SElinux. Not all fuse filesystems offer this support, so SElinux is not enabled for any fuse filesystem at the moment.

There is a task for the SElinux kernel devs to improve the handling of sub-filesystems, like "glusterfs" is a sub-filesystem of "fuse". When this feature is available in the kernel, Gluster can benefit from it and we should test again.

More details about the kernel side of things are in bug 1272868.

Comment 3 Niels de Vos 2016-03-20 12:25:31 UTC
There are several parts that need to get done before it is possible to set an SELinux context over FUSE mounts. We are working on getting the changes in the core Gluster part done for glusterfs-3.8.0 (see bug 1318100). More details can be found in this email:

  http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/13071

There is no chance that this gets backported to glusterfs-3.7.x, so I'm setting the version to 'mainline' for now.

Comment 4 Niels de Vos 2018-07-02 07:37:13 UTC
*** Bug 1596918 has been marked as a duplicate of this bug. ***

Comment 5 Vijay Bellur 2018-11-20 09:39:05 UTC
Migrated to github:

https://github.com/gluster/glusterfs/issues/593

Please follow the github issue for further updates on this bug.


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