Bug 170069 - cant mount usb keys/disks as user any more.
Summary: cant mount usb keys/disks as user any more.
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-10-06 23:38 UTC by Dave Jones
Modified: 2015-01-04 22:22 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-11-03 19:32:04 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dave Jones 2005-10-06 23:38:43 UTC
fstab contains..

/dev/sdc1               /media/key        vfat   
pamconsole,exec,noauto,user,fscontext=system_u:object_r:removable_t 0 0

yet when I try to mount it as a user, it fails, and this appears in dmesg

SELinux: security_context_to_sid(system_u:object_r:removable_t) failed for (dev
sdc1, type vfat) errno=-22


mounting it as root works. Trying to chown the files on the device fails with -EPERM

Above was with a FAT formatted usb key, but it's also repeatable with an ext3
formatted usb hard disk.

Comment 1 Daniel Walsh 2005-10-07 13:55:54 UTC
Steven and James,

Any idea why this is happening?  Is this MCS/MLS Related?

Comment 2 James Morris 2005-10-07 13:59:26 UTC
I'd say the fstab line needs to be updated to add s0 to the end of the context.

Comment 3 Daniel Walsh 2005-10-07 14:33:12 UTC
So the problem is either libsetrans is removing the :s0 file and the kernel does
not understand.  Or we have removable_t hard coded some where.  The
default_context file and media files have the :s0.

Dan

Comment 4 Daniel Walsh 2005-10-07 14:37:21 UTC
Dave edit /etc/mcs.conf and disable translations.  Uncomment the translation
line and see if it works.

Comment 5 Daniel Walsh 2005-10-07 15:29:50 UTC
I just inserted my usb stick into a rawhide machine and I am seeing

/dev/sdb on /media/usbdisk type ext2
(rw,nosuid,nodev,_netdev,fscontext=system_u:object_r:removable_t:s0,user=dwalsh)

And it seems to be working.




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