relan / exfat

Free exFAT file system implementation
GNU General Public License v2.0
779 stars 176 forks source link

Context option is ignored #172

Open Chaz6 opened 3 years ago

Chaz6 commented 3 years ago

I want to be able to export a mount as a samba share when selinux is active, however it seems to ignore the context option:-

$ uname -r
5.12.6-1.el7.elrepo.x86_64
$ sudo mount -t exfat -o uid=chaz,gid=chaz,context="system_u:object_r:samba_share_t:s0" /dev/sdc1 /mnt/usb-hdd
FUSE exfat 1.2.7
$ ls -lZd /mnt/usb-hdd/
drwxrwxrwx. 1 chaz chaz system_u:object_r:fusefs_t:s0 131072 Jan  1  1970 /mnt/usb-hdd
relan commented 3 years ago

Looks like SELinux-related options just need to be passed through to fuse: https://github.com/libfuse/libfuse/commit/9448849b568bf430950463fb70dab81a139b29bd