Red Hat Bugzilla – Bug 502946
can not mount NTFS-3g filesystem with a custom SELinux context
Last modified: 2010-09-23 08:57:48 EDT
Created attachment 345685 [details]
NTFS partition image (compressed with LZMA), good for testing
Description of problem:
I can not mount NTFS filesystems using the NTFS-3g driver with a custom SELinux context, e.g. public_content_t for a partition shared read-only over the network via samba/httpd.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. # mount -o context=system_u:object_r:public_content_t:s0 /dev/hda1 /mnt/extra1
The filesystem is mounted with a fusefs_t context.
# ls -lZd /mnt/extra1
drwxrwxrwx root root system_u:object_r:fusefs_t:s0
The filesystem should be mounted with a public_content_t context.
# ls -lZd /mnt/extra1
drwxrwxrwx root root system_u:object_r:public_content_t:s0
I can't get this to work either. And for even more fun, stracing the mount program causes glibc to throw an error about strace improperly freeing something.
My first guess would be that calling mount somehow calls a mount.ntfs-3g or some such which in turn is stripping the context= before the mount options are being passed to the kernel, but this is all just conjecture....
Somehow we need to know what options are being passed to the kernel in the mount syscall.
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '10'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 10's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 10 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora please change the 'version' of this
bug to the applicable version. If you are unable to change the version,
please add a comment here and someone will do it for you.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
The process we are following is described here:
The issue still exists for kernel-184.108.40.206-162.fc12.x86_64, ntfs-3g-2009.4.4-3.fc12.x86_64 and fuse-2.8.1-3.fc12.x86_64.
The issue still exists for kernel-220.127.116.11-112.fc13.x86_64.rpm and ntfs-3g-2010.5.16-1.fc13.x86_64.rpm.
TOm can you see if mount.ntfs-3g is passing the mount options to the kernel.
Any update on this bug?
Dan, I don't even know how to check if mount.nfts-3g is passing the mount options to the kernel.
If you can give me a better idea of what to check for here, I'll try.
I think Eric or James would be better at answering this.
Or maybe steved since nfs had a similar problem years ago.
Created attachment 446348 [details]
pass context mount option to mount() in libfuse
The problem is that libfuse does not know about the context mount option and therefore does not pass it to the kernel. The attached patch fixes this for the bundled copy of libfuse in ntfs-3g. The testcase is fixed for me with this patch.
ntfs-3g-2010.8.8-2.fc13 has been submitted as an update for Fedora 13.
ntfs-3g-2010.8.8-2.fc14 has been submitted as an update for Fedora 14.
ntfs-3g-2010.8.8-2.fc12 has been submitted as an update for Fedora 12.
ntfs-3g-2010.8.8-2.fc12 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
su -c 'yum --enablerepo=updates-testing update ntfs-3g'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/ntfs-3g-2010.8.8-2.fc12
ntfs-3g-2010.8.8-2.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.
ntfs-3g-2010.8.8-2.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.
ntfs-3g-2010.8.8-2.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.