Bug 216846

Summary: mount doesn't support context options that contain commas
Product: [Fedora] Fedora Reporter: Karel Zak <kzak>
Component: util-linuxAssignee: Karel Zak <kzak>
Status: CLOSED WONTFIX QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 6   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-12-16 22:35:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Karel Zak 2006-11-22 09:43:04 UTC
+++ This bug was initially created as a clone of Bug #211857 +++

Problem description from 104660:

The mount command doesn't support context options that contain commas.
See this message for patches which should be applied to correct the
problem:

http: //article.gmane.org/gmane.linux.redhat.security.lspp/1004

-- Additional comment from eparis on 2006-11-21 21:11 EST --
I had no plan of putting a specific patch for FC6 as when davej next updates the
FC6 kernel to 2.6.19 we will get it then.

http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=3528a95322b5c1ce882ab723f175a1845430cd89

Comment 1 Karel Zak 2006-11-22 10:03:15 UTC
This feature is temporarily disabled in util-linux-2.13-mount-context.patch. 

Comment 2 Josef Kubin 2007-12-16 16:44:57 UTC
I've encounter with similar behaviour but not exact the same.

The forced context in this case is completely ignored ...

[root@localhost vmware]# ls -Z /mnt/
drwxr-xr-x  root root system_u:object_r:mnt_t:s0       foo

[root@localhost vmware]# mount -t ntfs-3g -o loop,offset=32256,context=blabla
ntfsImg-flat /mnt/foo/

[root@localhost vmware]# ls -Z /mnt/
drwxrwxrwx  root root system_u:object_r:fusefs_t:s0    foo

[root@localhost vmware]# umount /mnt/foo/

[root@localhost vmware]# mount -t ntfs-3g -o
context=blabla:bleble:blabla,loop,offset=32256 ntfsImg-flat /mnt/foo/

[root@localhost vmware]# ls -Z /mnt/
drwxrwxrwx  root root system_u:object_r:fusefs_t:s0    foo

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

But not in this case.

[root@localhost vmware]# cat /dev/zero > file
[root@localhost vmware]# mkfs.ext3 file
...
[root@localhost vmware]# mount -o
loop,context=system_u:object_r:httpd_sys_content_t:s0 file /mnt/foo/

[root@localhost vmware]# ls -Z /mnt/
drwxr-xr-x  root root system_u:object_r:httpd_sys_content_t:s0 foo

Comment 3 Josef Kubin 2007-12-16 17:43:22 UTC
It looks that the bug is dependent on the number of options.

Comment 4 Karel Zak 2007-12-16 22:33:01 UTC
mount(8) doesn't mount all filesystems. Try to use /sbin/mount.fuse (or
.ntfs-3g) directly. IMHO this not a problem in mount(8).

Comment 5 Karel Zak 2007-12-16 22:35:16 UTC
Closing. FC6 is too old for new features.