This commit is contained in:
committed by
Git OBS Bridge
parent
64f2117c93
commit
93ebbed293
38
glib2-bnc387387-gio-hide-inaccessible-mounts.patch
Normal file
38
glib2-bnc387387-gio-hide-inaccessible-mounts.patch
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
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;
|
@@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue May 20 03:04:45 CEST 2008 - hpj@suse.de
|
||||||
|
|
||||||
|
- Add glib2-bnc387387-gio-hide-inaccessible-mounts.patch
|
||||||
|
(bnc#387387).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed May 14 01:50:37 CEST 2008 - hpj@suse.de
|
Wed May 14 01:50:37 CEST 2008 - hpj@suse.de
|
||||||
|
|
||||||
|
@@ -18,7 +18,7 @@ License: LGPL v2.1 or later
|
|||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
Version: 2.16.3
|
Version: 2.16.3
|
||||||
Release: 15
|
Release: 17
|
||||||
Summary: A Library with Convenient Functions Written in C
|
Summary: A Library with Convenient Functions Written in C
|
||||||
Url: http://www.gtk.org/
|
Url: http://www.gtk.org/
|
||||||
Source: ftp://ftp.gnome.org/pub/GNOME/sources/%{_name}/2.14/%{_name}-%{version}.tar.bz2
|
Source: ftp://ftp.gnome.org/pub/GNOME/sources/%{_name}/2.14/%{_name}-%{version}.tar.bz2
|
||||||
@@ -50,6 +50,8 @@ Patch8: glib2-bnc379332-desktop-su.patch
|
|||||||
Patch9: glib2-base64.patch
|
Patch9: glib2-base64.patch
|
||||||
# PATCH-FIX-UPSTREAM glib2-bnc379739-handle-blank-tryexec.patch bnc379739 hpj@novell.com
|
# PATCH-FIX-UPSTREAM glib2-bnc379739-handle-blank-tryexec.patch bnc379739 hpj@novell.com
|
||||||
Patch10: glib2-bnc379739-handle-blank-tryexec.patch
|
Patch10: glib2-bnc379739-handle-blank-tryexec.patch
|
||||||
|
# PATCH-FIX-UPSTREAM glib2-bnc387387-gio-hide-inaccessible-mounts.patch bnc387387 hpj@novell.com
|
||||||
|
Patch11: glib2-bnc387387-gio-hide-inaccessible-mounts.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
Requires: %{name}-lang = %{version}
|
Requires: %{name}-lang = %{version}
|
||||||
# For temporary %%pre script only.
|
# For temporary %%pre script only.
|
||||||
@@ -381,6 +383,7 @@ Authors:
|
|||||||
%patch8
|
%patch8
|
||||||
%patch9
|
%patch9
|
||||||
%patch10 -p1
|
%patch10 -p1
|
||||||
|
%patch11 -p0
|
||||||
cp -a %{S:1} %{S:2} %{S:3} .
|
cp -a %{S:1} %{S:2} %{S:3} .
|
||||||
cp -a %{S:4} gnome_defaults.conf
|
cp -a %{S:4} gnome_defaults.conf
|
||||||
if ! test -f %{_datadir}/aclocal/gtk-doc.m4 ; then
|
if ! test -f %{_datadir}/aclocal/gtk-doc.m4 ; then
|
||||||
@@ -511,6 +514,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%dir %{_datadir}/gtk-doc/html
|
%dir %{_datadir}/gtk-doc/html
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue May 20 2008 hpj@suse.de
|
||||||
|
- Add glib2-bnc387387-gio-hide-inaccessible-mounts.patch
|
||||||
|
(bnc#387387).
|
||||||
* Wed May 14 2008 hpj@suse.de
|
* Wed May 14 2008 hpj@suse.de
|
||||||
- Add glib2-bnc379739-handle-blank-tryexec.patch (bnc#379739).
|
- Add glib2-bnc379739-handle-blank-tryexec.patch (bnc#379739).
|
||||||
* Mon May 12 2008 maw@suse.de
|
* Mon May 12 2008 maw@suse.de
|
||||||
|
Reference in New Issue
Block a user