Re: mountpoint visibility



On Mon, 2004-12-13 at 14:32 +0100, aurelien naldi wrote:
> hello,
> 
> I'd like to start a discussion about visibility of mountpoint.
> 
> The main point is that I'm not sure users should see devices mounted by
> other users.
> 
> this is not a common case, personnal computers are generally used by ONE
> person at a time but let's think about a XDMCP server (I'm working on
> such a system). When using a thin X client as workstation, the main
> discomfort is to be unable to use removable media like floppy or usb
> disk. That's why we are working on making them avaible as transparantly
> as possible : on the thin client a script is launched by udev and inform
> the XDMCP server of devices being plugged, the XDMCP server will then
> pmount them through nbd as the user logged from this thin client.
> 
> Everything can be like on a real single system, except that if 10 users
> have their usbdisk mounted, then they will see all mountpoint and it
> becomes quite annoying.
> 
> the attached (yet very simple) patch to gnome-vfs prevents this: the
> mountpoint is marked as visible ONLY if the user is the owner of the
> mountpoint
> 
> it's not intended to be a perfect solution, I'd just like to discuss on
> it, and get some feedback.
> of course I secretly hope this feature will make it into gnome-vfs (or
> somewhere else in gnome if it's not the right place?), so that I could
> later upgrade to gnome2.10 without having to patch gnome-vfs again and
> again :))

In general i think this makes sense. If someone else mounts it its
unlikely that you're interested in the mount. However, I'm not sure the
check is good enough in general. I mean, what about non-fat mounts that
actually store the uid/gid, then stat:ing it might not give you your
uid. 

Also, i'm a bit afraid of doing actual stats on random locations, it has
historically caused problems on things like NFS mounts that are down
(check the fork and stat horror we do in gnome-vfs-unix-mounts.c) .
Perhaps its safe in this case though...

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a suicidal vegetarian sorceror on the edge. She's a ditzy paranoid femme 
fatale with an evil twin sister. They fight crime! 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]