Bug 502946 - can not mount NTFS-3g filesystem with a custom SELinux context
can not mount NTFS-3g filesystem with a custom SELinux context
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: ntfs-3g (Show other bugs)
13
All Linux
low Severity medium
: ---
: ---
Assigned To: Tom "spot" Callaway
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-27 17:41 EDT by Cristian Ciupitu
Modified: 2010-09-23 08:57 EDT (History)
8 users (show)

See Also:
Fixed In Version: ntfs-3g-2010.8.8-2.fc14
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-09-17 14:23:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
NTFS partition image (compressed with LZMA), good for testing (99.97 KB, application/octet-stream)
2009-05-27 17:41 EDT, Cristian Ciupitu
no flags Details
pass context mount option to mount() in libfuse (732 bytes, patch)
2010-09-09 15:12 EDT, Till Maas
no flags Details | Diff

  None (edit)
Description Cristian Ciupitu 2009-05-27 17:41:22 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):
kernel-2.6.27.24-170.2.68.fc10.i686.rpm

How reproducible:
Every time

Steps to Reproduce:
1. # mount -o context=system_u:object_r:public_content_t:s0 /dev/hda1 /mnt/extra1
  
Actual results:
The filesystem is mounted with a fusefs_t context.
# ls -lZd /mnt/extra1
drwxrwxrwx  root root system_u:object_r:fusefs_t:s0 

Expected results:
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 

Additional info:
ntfs-3g-2009.4.4-1.fc10.i386.rpm
fuse-2.7.4-2.fc10.i386.rpm
Comment 1 Chuck Ebbert 2009-06-03 04:43:50 EDT
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.
Comment 2 Eric Paris 2009-06-03 17:59:46 EDT
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.
Comment 3 Bug Zapper 2009-11-18 07:02:02 EST
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: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 4 Cristian Ciupitu 2009-12-07 18:23:43 EST
The issue still exists for kernel-2.6.31.6-162.fc12.x86_64, ntfs-3g-2009.4.4-3.fc12.x86_64 and fuse-2.8.1-3.fc12.x86_64.
Comment 5 Cristian Ciupitu 2010-06-05 12:38:13 EDT
The issue still exists for kernel-2.6.33.5-112.fc13.x86_64.rpm and ntfs-3g-2010.5.16-1.fc13.x86_64.rpm.
Comment 6 Daniel Walsh 2010-06-07 09:58:45 EDT
TOm can you see if mount.ntfs-3g is passing the mount options to the kernel.
Comment 7 Daniel Walsh 2010-09-09 08:53:00 EDT
Any update on this bug?
Comment 8 Tom "spot" Callaway 2010-09-09 10:55:44 EDT
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.
Comment 9 Daniel Walsh 2010-09-09 13:41:50 EDT
I think Eric or James would be better at answering this.
Comment 10 Daniel Walsh 2010-09-09 13:42:36 EDT
Or maybe steved since nfs had a similar problem years ago.
Comment 11 Till Maas 2010-09-09 15:12:15 EDT
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.
Comment 12 Fedora Update System 2010-09-09 16:12:30 EDT
ntfs-3g-2010.8.8-2.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/ntfs-3g-2010.8.8-2.fc13
Comment 13 Fedora Update System 2010-09-09 16:12:36 EDT
ntfs-3g-2010.8.8-2.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/ntfs-3g-2010.8.8-2.fc14
Comment 14 Fedora Update System 2010-09-09 16:12:42 EDT
ntfs-3g-2010.8.8-2.fc12 has been submitted as an update for Fedora 12.
https://admin.fedoraproject.org/updates/ntfs-3g-2010.8.8-2.fc12
Comment 15 Fedora Update System 2010-09-09 23:25:25 EDT
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
Comment 16 Fedora Update System 2010-09-17 14:23:21 EDT
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.
Comment 17 Fedora Update System 2010-09-17 14:30:33 EDT
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.
Comment 18 Fedora Update System 2010-09-23 08:57:42 EDT
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.

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