Bug 830997
Summary: | Can’t specify selinux context for ntfs partition | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | chritallic |
Component: | kernel | Assignee: | Kernel Maintainer List <kernel-maint> |
Status: | CLOSED INSUFFICIENT_DATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 17 | CC: | dwalsh, eparis, gansalmon, ibmalone, itamar, jforbes, jonathan, kernel-maint, madhu.chinakonda, rob.townley, sdsmall |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-02-01 15:47:51 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
chritallic
2012-06-11 21:48:06 UTC
Worked for me, same versions. What dmesg do you get? What is your kernel version? The following worked for me: dd if=/dev/zero of=ntfs.img bs=1M count=512 losetup --show -f ntfs.img mkntfs /dev/loop0 mount -o context="system_u:object_r:user_home_t:s0" /dev/loop0 /mnt ls -Zd /mnt I tried kernel-3.3.7-1.fc17.x86_64 and 3.4.0-1.fc17.x86_64 successfully. dmesg shows »SELinux: mount invalid. Same superblock, different security settings for (dev sda5, type fuseblk)«. My kernel version is 3.4.0-1.fc17.x86_64. (In reply to comment #2) > The following worked for me: > dd if=/dev/zero of=ntfs.img bs=1M count=512 > losetup --show -f ntfs.img > mkntfs /dev/loop0 > mount -o context="system_u:object_r:user_home_t:s0" /dev/loop0 /mnt > ls -Zd /mnt Okay, this worked for me too. However, »mount -o context="system_u:object_r:user_home_t:s0" /dev/sda5 /mnt« still gives me »ntfs-3g-mount: mount failed: Invalid argument«. »fdisk -l« shows: Device Boot Start End Blocks Id System /dev/sda5 98012628 199720079 50853726 7 HPFS/NTFS/exFAT (In reply to comment #3) > dmesg shows »SELinux: mount invalid. Same superblock, different security > settings for (dev sda5, type fuseblk)«. > > My kernel version is 3.4.0-1.fc17.x86_64. This means that you have the same superblock mounted elsewhere with different or no context= option. (In reply to comment #5) Okay, got it working now. I always had the partition mounted at bootime and used umount before trying to use the »mount -o context=…« command. Without the partition being mounted before it works. But why is this happening? I would expect the »mount« command to work the same way, after a proper umount. If SELinux stores the fs context for the rest of the session, even after an umount, this is definitively not what I would expect. That does seem wrong. SELinux stores it in the per-superblock security structure, so it should go away when the superblock is killed. Maybe the superblock stays around with fuse because the daemon keeps a reference? Is this still happening with 3.5.3 kernels in updates? Fedora 16 here with the same problem. Under kernel-3.4.11-1: mount /dev/sda1 /media/shared11 -t ntfs -o context="system_u:object_r:virt_image_t" ntfs-3g-mount: mount failed: Invalid argument I've tried kernel 3.6.2 from updates-testing with the same result. This bug is being closed because it has been set needinfo for more than 2 weeks without a response. If this is still an issue, please reopen and reply with the requested information. |