rpms/glib2/F-9 glib-2.16.3-ignore-inaccessible-mounts.patch, NONE, 1.1 glib2.spec, 1.166, 1.167
Warren Togami 砥上勇 (wtogami)
fedora-extras-commits at redhat.com
Mon Apr 28 22:50:02 UTC 2008
Author: wtogami
Update of /cvs/pkgs/rpms/glib2/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3532
Modified Files:
glib2.spec
Added Files:
glib-2.16.3-ignore-inaccessible-mounts.patch
Log Message:
- Ignore inaccessible mounts during mountpoint enumeration (GNOME #526320)
This prevents bogus inaccessible devices owned by one user from appearing
on the desktops of other users.
glib-2.16.3-ignore-inaccessible-mounts.patch:
--- NEW FILE glib-2.16.3-ignore-inaccessible-mounts.patch ---
Index: gio/gunixmounts.c
===================================================================
--- gio/gunixmounts.c (revision 6871)
+++ gio/gunixmounts.c (working copy)
@@ -44,6 +44,7 @@
#include <errno.h>
#include <string.h>
#include <signal.h>
+#include <gstdio.h>
#include "gunixmounts.h"
#include "gfile.h"
@@ -1887,8 +1888,24 @@
mount_path = mount_entry->mount_path;
if (mount_path != NULL)
{
- if (g_str_has_prefix (mount_path, "/media/"))
+ if (g_str_has_prefix (mount_path, "/media/")) {
+ char *path;
+ /* Avoid displaying mounts that are not accessible to the user.
+ *
+ * See http://bugzilla.gnome.org/show_bug.cgi?id=526320 for why we
+ * want to avoid g_access() for every mount point.
+ */
+ path = g_path_get_dirname (mount_path);
+ if (g_str_has_prefix (path, "/media/"))
+ {
+ if (g_access (path, R_OK|X_OK) != 0) {
+ g_free (path);
+ return FALSE;
+ }
+ }
+ g_free (path);
return TRUE;
+ }
if (g_str_has_prefix (mount_path, g_get_home_dir ()) && mount_path[strlen (g_get_home_dir())] == G_DIR_SEPARATOR)
return TRUE;
Index: glib2.spec
===================================================================
RCS file: /cvs/pkgs/rpms/glib2/F-9/glib2.spec,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -r1.166 -r1.167
--- glib2.spec 17 Apr 2008 23:49:13 -0000 1.166
+++ glib2.spec 28 Apr 2008 22:49:26 -0000 1.167
@@ -3,7 +3,7 @@
Summary: A library of handy utility functions
Name: glib2
Version: 2.16.3
-Release: 4%{?dist}
+Release: 5%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.gtk.org
@@ -29,6 +29,9 @@
# https://bugzilla.redhat.com/show_bug.cgi?id=442835
Patch2: gio-2.16-only-pass-uri-to-gio-apps.patch
+# http://bugzilla.gnome.org/show_bug.cgi?id=526320
+Patch3: glib-2.16.3-ignore-inaccessible-mounts.patch
+
%description
GLib is the low-level core library that forms the basis
for projects such as GTK+ and GNOME. It provides data structure
@@ -63,6 +66,7 @@
%patch0 -p1 -b .appinfo
%patch1 -R -p1 -b .revert-316221
%patch2 -p0 -b .only-pass-uri-to-gio-apps
+%patch3 -p0 -b .ignore-inaccessible-mounts
%build
%configure --disable-gtk-doc --enable-static
@@ -135,6 +139,11 @@
%{_libdir}/lib*.a
%changelog
+* Mon Apr 28 2008 Warren Togami <wtogami at redhat.com> - 2.16.3-5
+- Ignore inaccessible mounts during mountpoint enumeration (GNOME #526320)
+ This prevents bogus inaccessible devices owned by one user from appearing
+ on the desktops of other users.
+
* Thu Apr 17 2008 David Zeuthen <davidz at redhat.com> - 2.16.3-4
- Only pass URI's for gio apps (#442835)
More information about the fedora-extras-commits
mailing list