r9449 - in /desktop/experimental/gnome-vfs2/debian: changelog patches/22_ignore_inaccessible_volumes.patch

joss at users.alioth.debian.org joss at users.alioth.debian.org
Thu Mar 29 23:04:23 CET 2007


Author: joss
Date: Thu Mar 29 22:04:23 2007
New Revision: 9449

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=9449
Log:
* 22_ignore_inaccessible_volumes.patch: patch from Ubuntu to ignore 
  volumes on which the current user doesn't have permissions.
  Closes: #416692.

Added:
    desktop/experimental/gnome-vfs2/debian/patches/22_ignore_inaccessible_volumes.patch
Modified:
    desktop/experimental/gnome-vfs2/debian/changelog

Modified: desktop/experimental/gnome-vfs2/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gnome-vfs2/debian/changelog?rev=9449&op=diff
==============================================================================
--- desktop/experimental/gnome-vfs2/debian/changelog (original)
+++ desktop/experimental/gnome-vfs2/debian/changelog Thu Mar 29 22:04:23 2007
@@ -1,3 +1,11 @@
+gnome-vfs2 (1:2.18.0.1-2) UNRELEASED; urgency=low
+
+  * 22_ignore_inaccessible_volumes.patch: patch from Ubuntu to ignore 
+    volumes on which the current user doesn't have permissions.
+    Closes: #416692.
+
+ -- Josselin Mouette <joss at debian.org>  Fri, 30 Mar 2007 00:03:06 +0200
+
 gnome-vfs2 (1:2.18.0.1-1) experimental; urgency=low
 
   * New upstream release.

Added: desktop/experimental/gnome-vfs2/debian/patches/22_ignore_inaccessible_volumes.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gnome-vfs2/debian/patches/22_ignore_inaccessible_volumes.patch?rev=9449&op=file
==============================================================================
--- desktop/experimental/gnome-vfs2/debian/patches/22_ignore_inaccessible_volumes.patch (added)
+++ desktop/experimental/gnome-vfs2/debian/patches/22_ignore_inaccessible_volumes.patch Thu Mar 29 22:04:23 2007
@@ -1,0 +1,45 @@
+diff -Nur gnome-vfs2-2.15.92/libgnomevfs/gnome-vfs-hal-mounts.c gnome-vfs2-2.15.92.new/libgnomevfs/gnome-vfs-hal-mounts.c
+--- gnome-vfs2-2.15.92/libgnomevfs/gnome-vfs-hal-mounts.c	2006-08-22 10:40:05.000000000 +0200
++++ gnome-vfs2-2.15.92.new/libgnomevfs/gnome-vfs-hal-mounts.c	2006-08-22 10:42:53.000000000 +0200
+@@ -39,6 +39,7 @@
+ 
+ #include <glib.h>
+ #include <glib/gi18n-lib.h>
++#include <glib/gstdio.h>
+ #include <libgnomevfs/gnome-vfs-utils.h>
+ 
+ #include <libhal.h>
+@@ -699,6 +700,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;
+diff -Nur gnome-vfs2-2.15.92/libgnomevfs/gnome-vfs-volume-monitor-daemon.c gnome-vfs2-2.15.92.new/libgnomevfs/gnome-vfs-volume-monitor-daemon.c
+--- gnome-vfs2-2.15.92/libgnomevfs/gnome-vfs-volume-monitor-daemon.c	2006-08-22 10:40:04.000000000 +0200
++++ gnome-vfs2-2.15.92.new/libgnomevfs/gnome-vfs-volume-monitor-daemon.c	2006-08-22 10:48:11.000000000 +0200
+@@ -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"
+@@ -1058,6 +1059,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);




More information about the pkg-gnome-commits mailing list