Bug 122515 - floppy should be user mountable
Summary: floppy should be user mountable
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: policy
Version: 2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Russell Coker
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-05-05 13:22 UTC by Mikel Ward
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version: 1.25.4-10.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-15 15:58:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
current (modified) file system table on pepper (510 bytes, text/plain)
2004-05-22 00:22 UTC, Mikel Ward
no flags Details

Description Mikel Ward 2004-05-05 13:22:28 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)
Gecko/20040422 Epiphany/1.2.4

Description of problem:
I upgraded from Fedore Core 1 to Fedora Core 2 Test 3.  In the new
Nautilus spacial view, the "Computer" "folder" had appropriate icons
for the CD/DVD drives in my system, but not for the floppy disk.

The root cause of this (as nicely document in the GNOME user guide) is
that a block device must be user mountable in the file system table
for it to appear in the Computer location in the file manager.

I suggest ensuring the default fstab entry for the system's floppy
disk (FD) drive add the user option by default, as it seems to do for
the CD drives.  It might also be an option to use the owner option if
some magic happens to ensure the FD and CD device files get the
necessary permissions and such access is desired (I think magicdev
causes that, indeed both /dev/hdc and /dev/fd0 are owned by the user
currently logged in on the local X session) and Nautilus does the same
thing here.

Version-Release number of selected component (if applicable):


How reproducible:
Didn't try

Steps to Reproduce:


Additional info:

Comment 1 Bill Nottingham 2004-05-21 17:40:43 UTC
What does your /etc/fstab look like?

Comment 2 Mikel Ward 2004-05-22 00:22:47 UTC
Created attachment 100439 [details]
current (modified) file system table on pepper

This is my current file system table for my workstation, pepper.  The important
thing to note is that the entry /dev/fd0 did not initially have either the
owner or user flags set, and this is what I am proposing be considered.

Comment 3 Bill Nottingham 2004-05-24 16:49:11 UTC
Hm, I'm curious what created it, then.

updfstab always adds 'noauto,owner,kudzu'. Do you have something
additional running that might touch /etc/fstab?

Comment 4 Mikel Ward 2004-05-25 07:59:00 UTC
The file would have been first created on an FC1 (Yarrow) install.

I thought the kudzu flag meant it would be modified by kudzu and/or
updfstab as it saw fit.

Are you suggesting something different created it and so it's not
being touched, or that something is modifying this file after kuzdu on
every boot?  I certainly can't think of anything that would be doing that.

The only other thing that might be relevant if we're wondering why it
wasn't touched is that I think I may have retabulated the file with
what ever editor settings I was using at the time.  Do kuzdu and
friends care about tabs versus spaces and such?

Anyway, the core problem as I see it is still that the file wasn't
created the first time with the desireable options.  Is this something
that may have changed between FC1 and FC2?

Comment 5 Bill Nottingham 2004-05-25 16:00:43 UTC
I *believe* it won't change the options if they're already there.

If you remove the entry and re-run updfstab, is it created correctly?



Comment 6 Bill Nottingham 2004-05-25 16:03:25 UTC
I just confirmed, it won't change the mount options if it's already
there with the correct device. So, something possibly changed it at
some single point in the past.

spaces/tabs shouldn't make a difference.

Comment 7 Mikel Ward 2004-05-25 16:13:37 UTC
The following entry was created:
/dev/fd0                /mnt/floppy             auto   
noauto,owner,kudzu 0 0

Existing entries remained as-was.  This seems to match what you were
expecting.

The Floppy icon also currently appears in the Filesystem view (altho I
didn't restart to make certain).

In light of this, it seems the desired behavior is in fact the
default. -> WORKSFORME

Comment 8 David Balažic 2004-06-12 11:29:21 UTC
I have a fresh install of FC2 ( with SELinux enabled ).

User can not mount floppy :

[stein@localhost stein]$ id
uid=500(stein) gid=500(stein) groups=500(stein)
context=user_u:user_r:user_t
[stein@localhost stein]$ mount /mnt/floppy/
mount: only root can mount /dev/fd0 on /mnt/floppy
[stein@localhost stein]$

Same thing if done from GNOME GUI ( Desktop/Computer/Floppy )

Same thing with CDROM units.

If not told otherwise, I will reopen this bug or maybe submit a new one.

Comment 9 David Balažic 2004-06-15 07:33:24 UTC
This is my fstab :

LABEL=/                 /                       ext3    defaults     
  1 1
LABEL=/boot             /boot                   ext3    defaults     
  1 2
none                    /dev/pts                devpts  gid=5,mode=620
 0 0
none                    /dev/shm                tmpfs   defaults     
  0 0
none                    /proc                   proc    defaults     
  0 0
none                    /sys                    sysfs   defaults     
  0 0
/dev/hde3               swap                    swap    defaults     
  0 0
/dev/cdrom              /mnt/cdrom              udf,iso9660
noauto,owner,kudzu,ro 0 0
/dev/cdrom1             /mnt/cdrom1             udf,iso9660
noauto,owner,kudzu,ro 0 0
/dev/cdrom2             /mnt/cdrom2             udf,iso9660
noauto,owner,kudzu,ro 0 0
/dev/fd0                /mnt/floppy             auto   
noauto,owner,kudzu 0 0

Comment 10 Bill Nottingham 2004-06-28 21:12:13 UTC
Any kernel messages from SELinux?

Comment 11 David Balažic 2004-07-02 07:10:31 UTC
Yes, when trying to "mount /mnt/floppy" as non-root, I get this on
console :

audit(1088700581.837:0): avc:  denied  { use } for  pid=2639
exe=/bin/mount
path=/dev/tty2 dev=hde2 ino=584194 scontext=user_u:user_r:user_mount_t
tcontext=system_u:system_r:local_login_t tclass=fd
audit(1088700581.837:0): avc:  denied  { use } for  pid=2639
exe=/bin/mount
path=/dev/tty2 dev=hde2 ino=584194 scontext=user_u:user_r:user_mount_t
tcontext=system_u:system_r:local_login_t tclass=fd
audit(1088700581.837:0): avc:  denied  { use } for  pid=2639
exe=/bin/mount
path=/dev/tty2 dev=hde2 ino=584194 scontext=user_u:user_r:user_mount_t
tcontext=system_u:system_r:local_login_t tclass=fd
audit(1088700581.838:0): avc:  denied  { write } for  pid=2639
exe=/bin/mount
path=/ dev=hde2 ino=4043 scontext=user_u:user_r:user_mount_t
tcontext=system_u:object_r:root_t tclass=chr_file
audit(1088700581.839:0): avc:  denied  { write } for  pid=2639
exe=/bin/mount
path=/ dev=hde2 ino=4043 scontext=user_u:user_r:user_mount_t
tcontext=system_u:object_r:root_t tclass=chr_file

Comment 12 Daniel Walsh 2004-11-06 06:53:49 UTC
This should be fixed in the current release of FC3 with 
selinux-policy-strict-1.18.1 or greater.


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