Bug 502946 - can not mount NTFS-3g filesystem with a custom SELinux context
Summary: can not mount NTFS-3g filesystem with a custom SELinux context
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ntfs-3g
Version: 13
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-05-27 21:41 UTC by Cristian Ciupitu
Modified: 2010-09-23 12:57 UTC (History)
8 users (show)

Fixed In Version: ntfs-3g-2010.8.8-2.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-09-17 18:23:27 UTC
Type: ---
Embargoed:


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

Description Cristian Ciupitu 2009-05-27 21:41:22 UTC
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 08:43:50 UTC
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 21:59:46 UTC
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 12:02:02 UTC
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 23:23:43 UTC
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 16:38:13 UTC
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 13:58:45 UTC
TOm can you see if mount.ntfs-3g is passing the mount options to the kernel.

Comment 7 Daniel Walsh 2010-09-09 12:53:00 UTC
Any update on this bug?

Comment 8 Tom "spot" Callaway 2010-09-09 14:55:44 UTC
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 17:41:50 UTC
I think Eric or James would be better at answering this.

Comment 10 Daniel Walsh 2010-09-09 17:42:36 UTC
Or maybe steved since nfs had a similar problem years ago.

Comment 11 Till Maas 2010-09-09 19:12:15 UTC
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 20:12:30 UTC
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 20:12:36 UTC
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 20:12:42 UTC
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-10 03:25:25 UTC
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 18:23:21 UTC
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 18:30:33 UTC
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 12:57:42 UTC
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.