lkml.org 
[lkml]   [2003]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: About /etc/mtab and /proc/mounts
Date
mru@users.sourceforge.net (Måns Rullgård) writes:

> Olaf Dietsche <olaf.dietsche@t-online.de> writes:
>
>> The 'user' option is in /etc/fstab, so this is not a problem. I can
>> mount _and_ umount /cdrom as a simple user.
>
> It's strange if you can. My mount (fairly recent) looks in fstab to
> determine whether a user should be allowed to mount a device.
> However, when unmounting it checks /etc/mtab to make sure it was you
> who mounted it in the first place, making it impossible to unmount
> someone else's cdrom. If you use the 'users' (note the 's') option
> instead any user can mount or unmount the device at any time, mtab
> being ignored.

I just verified it. I and anybody else can mount and umount /cdrom. If
I mounted /cdrom, someone else can umount it.

$ mount -V
mount: mount-2.11n

$ grep user /etc/fstab
/dev/hdb/0 /cdrom iso9660 defaults,ro,unhide,user,noauto,noexec,nosuid 0 2

$ ls -l /etc/mtab
lrwxrwxrwx 1 root root 12 2002-09-22 02:58 /etc/mtab -> /proc/mounts

When /etc/mtab is a regular file, it works as you described.

Regards, Olaf.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:33    [from the cache]
©2003-2011 Jasper Spaans