- Fix bad mount prefix stripping (part of #509612)

- Fix gvfsd-sftp segfault when asking a question
- Enable tar+xz in the archive mounter
This commit is contained in:
Tomas Bzatek 2009-08-07 12:55:52 +00:00
parent b84fbc0b96
commit ff85c53391
4 changed files with 98 additions and 4 deletions

View File

@ -0,0 +1,37 @@
From 54a2ed675de586102462415fce72ed28aa7e2388 Mon Sep 17 00:00:00 2001
From: Tomas Bzatek <tbzatek@redhat.com>
Date: Fri, 7 Aug 2009 11:29:11 +0200
Subject: [PATCH] =?UTF-8?q?Bug=20589434=20=E2=80=93=20gvfsd-sftp=20crashed=20with=20SIGSEGV=20in=20strlen()?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Pass correct pointer to the choices struct
---
daemon/gvfsbackendsftp.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/daemon/gvfsbackendsftp.c b/daemon/gvfsbackendsftp.c
index 3b510a7..b32d11b 100644
--- a/daemon/gvfsbackendsftp.c
+++ b/daemon/gvfsbackendsftp.c
@@ -1034,7 +1034,6 @@ handle_login (GVfsBackend *backend,
strstr (buffer, "Key fingerprint:") != NULL)
{
const gchar *choices[] = {_("Log In Anyway"), _("Cancel Login")};
- const gchar *v_choices = (const gchar *)choices;
const gchar *choice_string;
gchar *hostname = NULL;
gchar *fingerprint = NULL;
@@ -1055,7 +1054,7 @@ handle_login (GVfsBackend *backend,
if (!g_mount_source_ask_question (mount_source,
message,
- &v_choices,
+ (const gchar **) &choices,
2,
&aborted,
&choice) ||
--
1.6.4

View File

@ -0,0 +1,44 @@
From 3ba4f3e3deae84cbd5ffe8e7bfd2803d96e7e2e6 Mon Sep 17 00:00:00 2001
From: Tomas Bzatek <tbzatek@redhat.com>
Date: Wed, 5 Aug 2009 16:50:28 +0200
Subject: [PATCH] Don't strip mount prefix when returning local mapped path
On complex URIs like 'dav://server/gallery/w/TestAlbum',
g_file_get_path () would return malformed path with the middle
path '/gallery/w' stripped. This patch ensures full path to be
returned.
See bug #590862 for more details.
---
client/gdaemonfile.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/client/gdaemonfile.c b/client/gdaemonfile.c
index 8e14929..be9baef 100644
--- a/client/gdaemonfile.c
+++ b/client/gdaemonfile.c
@@ -167,7 +167,6 @@ g_daemon_file_get_path (GFile *file)
{
GDaemonFile *daemon_file = G_DAEMON_FILE (file);
GMountInfo *mount_info;
- const char *rel_path;
char *path;
/* This is a sync i/o call, which is a bit unfortunate, as
@@ -185,12 +184,7 @@ g_daemon_file_get_path (GFile *file)
path = NULL;
if (mount_info->fuse_mountpoint)
- {
- rel_path = daemon_file->path +
- strlen (mount_info->mount_spec->mount_prefix);
-
- path = g_build_filename (mount_info->fuse_mountpoint, rel_path, NULL);
- }
+ path = g_build_filename (mount_info->fuse_mountpoint, daemon_file->path, NULL);
g_mount_info_unref (mount_info);
--
1.6.4

View File

@ -39,7 +39,7 @@ diff -up /dev/null gvfs-1.3.2/mount-archive.desktop.in.in
+_Name=Archive Mounter
+Exec=@libexecdir@/gvfsd-archive file=%u
+X-Gnome-Vfs-System=gio
+MimeType=application/x-cd-image;application/x-bzip-compressed-tar;application/x-compressed-tar;application/x-tar;application/x-cpio;application/x-zip;application/zip;application/x-lzma-compressed-tar;
+MimeType=application/x-cd-image;application/x-bzip-compressed-tar;application/x-compressed-tar;application/x-tar;application/x-cpio;application/x-zip;application/zip;application/x-lzma-compressed-tar;application/x-xz-compressed-tar;
+Terminal=false
+StartupNotify=false
+Type=Application

View File

@ -1,7 +1,7 @@
Summary: Backends for the gio framework in GLib
Name: gvfs
Version: 1.3.3
Release: 2%{?dist}
Release: 3%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.gtk.org
@ -40,7 +40,13 @@ Patch2: gvfs-1.3.4-output-stream-callback-arg.patch
# smb url don't work in the run application dialog
# http://bugzilla.gnome.org/show_bug.cgi?id=573994
Patch3: gvfs-1.3.4-smb-browse-fake-content-type.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=497631
# Bad mount prefix stripping in g_daemon_file_get_path()
# http://bugzilla.gnome.org/show_bug.cgi?id=590862
Patch4: gvfs-1.3.4-dont-strip-mount-prefix-for-local-paths.patch
# gvfsd-sftp crashed with SIGSEGV in strlen()
# http://bugzilla.gnome.org/show_bug.cgi?id=589434
Patch5: gvfs-1.3.4-bug-589434-sftp-choices-segfault.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=497631
Patch8: gvfs-1.2.2-dnssd-deadlock.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=504339
Patch9: gvfs-1.2.3-sftp-40sec-timeout.patch
@ -89,7 +95,7 @@ shares (SMB) to applications using gvfs.
Summary: Archiving support for gvfs
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
BuildRequires: libarchive-devel >= libarchive-2.5.903a-2
BuildRequires: libarchive-devel >= libarchive-2.7.1-1
%description archive
This package provides support for accessing files inside Zip and Tar archives,
@ -130,6 +136,8 @@ media players (Media Transfer Protocol) to applications using gvfs.
%patch1 -p1 -b .archive-integration
%patch2 -p1 -b .gedit-segfault
%patch3 -p1 -b .smb-fake-content-type
%patch4 -p1 -b .mount-prefix
%patch5 -p1 -b .sftp-choices-segfault
%patch8 -p1 -b .dnssd-deadlock
%patch9 -p1 -b .sftp-timeout
@ -278,6 +286,11 @@ update-desktop-database &> /dev/null ||:
%changelog
* Fri Aug 7 2009 Tomas Bzatek <tbzatek@redhat.com> - 1.3.3-3
- Fix bad mount prefix stripping (part of #509612)
- Fix gvfsd-sftp segfault when asking a question
- Enable tar+xz in the archive mounter
* Tue Aug 4 2009 Tomas Bzatek <tbzatek@redhat.com> - 1.3.3-2
- Fix gedit crashed with SEGV in strlen()
- Fix SMB protocol not handled when opening from a bookmark (#509832)