GNOME Bugzilla – Bug 530379
Inaccessible mount points appear on other user's desktops
Last modified: 2008-04-28 16:19:41 UTC
glib2-2.16.3-4.fc9.x86_64 gvfs-0.2.3-11.fc9.x86_64 LTSP uses a fuse filesystem to mount devices like USB sticks from thin clients to the terminal server. They appear as devices like: /media/$username/usbdisk-sdb2 If user joe is logged in and inserts a USB stick, it is readable only to user joe. However it appears on the GNOME desktops of all other logged in users even though they can't read it. http://people.redhat.com/wtogami/temp/gnome-vfs-ignore-mountpoints.patch Ubuntu and Debian are using this patch against gnome-vfs to ignore mountpoints that a user cannot access. We need something like this for gvfs.
The only concern I have with doing something like this is the use of the access() system call. It might be expensive to do (would need to do it for every mount point) and, worse, it might hang the process on some file systems (e.g. autofs and nfs). I haven't looked too closely into the code though. Are there other places in the mount/mount point enumeration code (e.g. gio/gunixmounts.c) where we do similar stuff? IMO, it would be better if LTSP just mounted these things in the users home directory under e.g. $HOME/.ltsp/usbdisk-sdb2.
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of 526320 ***
note that the gnome-vfs patch has been sent to http://bugzilla.gnome.org/show_bug.cgi?id=352381 some years ago but nobody commented on it