1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
Index: gnome-vfs-2.24.2/libgnomevfs/gnome-vfs-hal-mounts.c
===================================================================
--- gnome-vfs-2.24.2.orig/libgnomevfs/gnome-vfs-hal-mounts.c 2010-02-06 11:55:46.357284162 +0100
+++ gnome-vfs-2.24.2/libgnomevfs/gnome-vfs-hal-mounts.c 2010-02-06 11:55:50.133278538 +0100
@@ -41,6 +41,7 @@
#include <glib.h>
#include <glib/gi18n-lib.h>
+#include <glib/gstdio.h>
#include <libgnomevfs/gnome-vfs-utils.h>
#include <libhal.h>
@@ -703,6 +704,10 @@
mount_point = libhal_volume_get_mount_point (hal_volume);
/* blacklist fhs2.3 top level mount points */
if (mount_point != NULL) {
+ /* also ignore mounts which are inaccessible for the user */
+ if (g_access (mount_point, R_OK) != 0)
+ goto out;
+
for (i = 0; fhs23_toplevel_mount_points[i] != NULL; i++) {
if (strcmp (mount_point, fhs23_toplevel_mount_points[i]) == 0)
goto out;
Index: gnome-vfs-2.24.2/libgnomevfs/gnome-vfs-volume-monitor-daemon.c
===================================================================
--- gnome-vfs-2.24.2.orig/libgnomevfs/gnome-vfs-volume-monitor-daemon.c 2010-02-06 11:55:48.097278145 +0100
+++ gnome-vfs-2.24.2/libgnomevfs/gnome-vfs-volume-monitor-daemon.c 2010-02-06 11:55:50.133278538 +0100
@@ -27,6 +27,7 @@
#include <stdlib.h>
#include <libgnomevfs/gnome-vfs-utils.h>
#include <glib/gi18n-lib.h>
+#include <glib/gstdio.h>
#include "gnome-vfs-volume-monitor-daemon.h"
#include "gnome-vfs-volume-monitor-private.h"
@@ -1061,6 +1062,11 @@
l != NULL;
l = l->next, ld = ld->next) {
GnomeVFSUnixMount *mount = l->data;
+
+ /* ignore inaccessible mounts */
+ if (mount->mount_path && g_access (mount->mount_path, R_OK) != 0)
+ continue;
+
dev_t unix_device = GPOINTER_TO_UINT (ld->data);
vol = create_vol_from_mount (volume_monitor, mount);
|