Bug 219645 - Can't mount with additional contexts
Summary: Can't mount with additional contexts
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: nfs-utils
Version: 5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Karel Zak
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-12-14 16:53 UTC by Karel Zak
Modified: 2007-11-30 22:07 UTC (History)
6 users (show)

Fixed In Version: 5.0.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-01-15 14:30:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Karel Zak 2006-12-14 16:53:09 UTC
+++ This bug was initially created as a clone of Bug #211827 +++

# mount -o loop,context=root:object_r:root_t:s0:c1,c4 foo /mnt
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

See discussion here for more details:
https://www.redhat.com/archives/redhat-lspp/2006-October/msg00208.html

-- Additional comment from bnocera on 2006-10-23 09:12 EST --
Let me know if a kernel bug is needed as well, I'll get the TAM to open a new IT
for it.

-- Additional comment from kzak on 2006-10-23 10:07 EST --
The patches are waiting in my INBOX, but it's a surprise for me that we expect
this change in RHEL5 GA. My plan was add this feature to rawhide (fc7). 

The patch to nfsmount.c is useless -- in RHEL5 we use separate mount.nfs (from
the nfs-utils package) instead the old NFS from from util-linux. It means you
have to open a new IT/BZ request for nfs-utils too. (Please, assign to me --
I'll fix it in both packages.)


-- Additional comment from tao on 2006-10-24 14:44 EST --

A separate BZ was opened for the kernel change. I had put in a note in the
IT. But the BZ is 211857 if you want to grab it.

Comment 1 RHEL Program Management 2006-12-15 06:40:41 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 2 Jay Turner 2006-12-18 17:53:25 UTC
Seems a little late to take in something like this.  What's the business impact
of not taking the change?

Comment 3 Eric Paris 2006-12-18 18:07:58 UTC
NFS being basically useless in many/most SELinux environments?  The change has
already gone into kernel, it has already gone into mount utilities for local
filesystems, the patch is just missing from the NFS mount utility.

many users use -o context="your context here" to mount NFS shares so that
daemons like apache can then use that data.  Without this change there will be
no way for users to mount NFS with a given context.

Comment 4 Karel Zak 2006-12-18 18:31:59 UTC
We need to support this in nfs-utils, because we already support it in standard
mount. The patch for /sbin/mount.nfs is almost same like for standard
/bin/mount. I'm going to apply the patch ASAP.

Comment 5 Karel Zak 2006-12-18 23:25:38 UTC
Fixed. Update to nfs-utils-1.0.9-16.el5.

Comment 6 Jay Turner 2007-01-03 15:14:14 UTC
[root@haring tmp]# rpm -q nfs-utils
nfs-utils-1.0.9-16.el5.i386
[root@haring tmp]# uname -r
2.6.18-1.2943.el5

[root@haring tmp]# mount -o loop,context=root:object_r:root_t:s0:c1,c4 boot.iso
/mnt/qa
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

Dropping the ",c4" from the command works.

Comment 8 Karel Zak 2007-01-05 13:16:45 UTC
It works -- see bug #211827. You have to use quotes! 

 mount -o loop,context=\"root:object_r:root_t:s0:c1,c4\" boot.iso /mnt/qa



Comment 10 Jay Turner 2007-01-05 13:40:03 UTC
Ah yes, all better now on all accounts.

Comment 11 Jay Turner 2007-01-15 14:30:16 UTC
nfs-utils-1.0.9-16.el5 included in 20070111.1 and 20070112.3.


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