- Backport some upstream patches

f38
Tomas Bzatek 15 years ago
parent d3d6aebbd1
commit a0b3041589

@ -0,0 +1,84 @@
From 706b54502b1d3ccb179a4d8b91c585e152bbae81 Mon Sep 17 00:00:00 2001
From: Alexander Larsson <alexl@redhat.com>
Date: Mon, 25 May 2009 10:33:59 +0200
Subject: [PATCH 3/6] cdda: Handle invalid data (#582303)
Fix for CAN-2005-0706, handle negative values that may appear when
there is invalid input. Patch from openSUSE.
Note: cdda is disabled by default, so this doesn't affect all users.
---
modules/cdda-cddb.c | 36 +++++++++++++++++++++---------------
1 files changed, 21 insertions(+), 15 deletions(-)
diff --git a/modules/cdda-cddb.c b/modules/cdda-cddb.c
index ce83b52..0ec4e25 100644
--- a/modules/cdda-cddb.c
+++ b/modules/cdda-cddb.c
@@ -537,26 +537,30 @@ static void CDDBProcessLine(char *inbuffer,DiscData *data,
else if(!g_ascii_strncasecmp(inbuffer,"TTITLE",6)) {
track=atoi(strtok(inbuffer+6,"="));
- if(track<numtracks)
+ if(track >= 0 && track<numtracks)
+ {
len=strlen(data->data_track[track].track_name);
- strncpy(data->data_track[track].track_name+len,
+ strncpy(data->data_track[track].track_name+len,
ChopWhite(strtok(NULL,"")),256-len);
+ }
}
else if(!g_ascii_strncasecmp(inbuffer,"TARTIST",7)) {
data->data_multi_artist=TRUE;
track=atoi(strtok(inbuffer+7,"="));
- if(track<numtracks)
+ if(track >= 0 && track<numtracks)
+ {
len=strlen(data->data_track[track].track_artist);
- st = strtok(NULL, "");
- if(st == NULL)
- return;
-
- strncpy(data->data_track[track].track_artist+len,
+ st = strtok(NULL, "");
+ if(st == NULL)
+ return;
+
+ strncpy(data->data_track[track].track_artist+len,
ChopWhite(st),256-len);
+ }
}
else if(!g_ascii_strncasecmp(inbuffer,"EXTD",4)) {
len=strlen(data->data_extended);
@@ -566,15 +570,17 @@ static void CDDBProcessLine(char *inbuffer,DiscData *data,
else if(!g_ascii_strncasecmp(inbuffer,"EXTT",4)) {
track=atoi(strtok(inbuffer+4,"="));
- if(track<numtracks)
+ if(track >= 0 && track<numtracks)
+ {
len=strlen(data->data_track[track].track_extended);
- st = strtok(NULL, "");
- if(st == NULL)
- return;
-
- strncpy(data->data_track[track].track_extended+len,
- ChopWhite(st),4096-len);
+ st = strtok(NULL, "");
+ if(st == NULL)
+ return;
+
+ strncpy(data->data_track[track].track_extended+len,
+ ChopWhite(st),4096-len);
+ }
}
else if(!g_ascii_strncasecmp(inbuffer,"PLAYORDER",5)) {
len=strlen(data->data_playlist);
--
1.6.3.3

@ -0,0 +1,26 @@
From f732047ada92a99f1f0cd3ceb7b76499789990f8 Mon Sep 17 00:00:00 2001
From: Alexander Larsson <alexl@redhat.com>
Date: Mon, 25 May 2009 10:37:14 +0200
Subject: [PATCH 4/6] Mark netware mounts as non-local (#582304)
Filesystems of type "novfs" come from Novell Client for Linux, i.e.
they are remote Netware mounts.
---
modules/file-method.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/modules/file-method.c b/modules/file-method.c
index b74535d..37e4853 100644
--- a/modules/file-method.c
+++ b/modules/file-method.c
@@ -1273,6 +1273,7 @@ do_is_local (GnomeVFSMethod *method,
(strcmp (type, "afs") != 0) &&
(strcmp (type, "autofs") != 0) &&
(strcmp (type, "unknown") != 0) &&
+ (strcmp (type, "novfs") != 0) &&
(strcmp (type, "ncpfs") != 0));
G_UNLOCK (fstype);
} else {
--
1.6.3.3

@ -0,0 +1,26 @@
From bd5a83f1a6327cbb376ec4915f252f292b5bfb07 Mon Sep 17 00:00:00 2001
From: Alexander Larsson <alexl@redhat.com>
Date: Mon, 25 May 2009 10:41:34 +0200
Subject: [PATCH 5/6] Don't pass in lengths > 64k to smb (#582308)
There seem to be some limitation in smb that makes this not work.
---
modules/smb-method.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules/smb-method.c b/modules/smb-method.c
index 8042a61..42d6c78 100644
--- a/modules/smb-method.c
+++ b/modules/smb-method.c
@@ -1646,7 +1646,7 @@ do_read (GnomeVFSMethod *method,
/* Important: perform_authentication leaves and re-enters the lock! */
while (perform_authentication (&actx) > 0) {
- n = smb_context->read (smb_context, handle->file, buffer, num_bytes);
+ n = smb_context->read (smb_context, handle->file, buffer, MIN (USHRT_MAX, num_bytes));
actx.res = (n >= 0) ? GNOME_VFS_OK : gnome_vfs_result_from_errno ();
}
--
1.6.3.3

@ -0,0 +1,40 @@
From ddccb959a78b44133716bf9f01c8faa2306c5408 Mon Sep 17 00:00:00 2001
From: Alexander Larsson <alexl@redhat.com>
Date: Thu, 16 Apr 2009 09:07:05 +0000
Subject: [PATCH 1/6] =?utf-8?q?Bug=20500307=20=E2=80=93=20uninitialized=20GnomeVFSFileInfo=20struct=20in=20do=5Fseek()?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
2009-04-16 Alexander Larsson <alexl@redhat.com>
Bug 500307 uninitialized GnomeVFSFileInfo struct in do_seek()
* modules/sftp-method.c:
(do_seek):
Initialize info to avoid crashes.
Patch from Fabrice Bellet
svn path=/trunk/; revision=5551
---
ChangeLog | 9 +++++++++
modules/sftp-method.c | 2 +-
2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/modules/sftp-method.c b/modules/sftp-method.c
index 4a53af2..07f0e4e 100644
--- a/modules/sftp-method.c
+++ b/modules/sftp-method.c
@@ -2387,7 +2387,7 @@ do_seek (GnomeVFSMethod *method,
GnomeVFSContext *context)
{
SftpOpenHandle *handle;
- GnomeVFSFileInfo file_info;
+ GnomeVFSFileInfo file_info = { 0, };
GnomeVFSResult res;
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter", G_STRFUNC));
--
1.6.3.3

@ -0,0 +1,31 @@
gnome-vfs-daemon reads /proc/mounts at startup and uses HAL via
libhal_drive_from_device_file() in multiple places in gnome-vfs-hal-mounts.c
Strings in DBUS must be valid UTF8. If the device path is not valid UTF8,
dbus_connection_send() will cause a disconnect of the caller and an exit.
Threfore if the device path contains invalid utf8, gnome-vfs-daemon will fail
to start. If that happens during a session, gnome-vfs-daemon will be restarted
by any gnome application wich cause a lot of start/stop of gnome-vfs-daemon.
The following patch simply ensures that we use valid utf8 for device path to
avoid problems with hal/dbus.
Olivier Fourdan <ofourdan@redhat.com>
gnome-vfs-volume-monitor-daemon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -up gnome-vfs-2.16.2/libgnomevfs/gnome-vfs-volume-monitor-daemon.c.utf8-mount gnome-vfs-2.16.2/libgnomevfs/gnome-vfs-volume-monitor-daemon.c
--- gnome-vfs-2.16.2/libgnomevfs/gnome-vfs-volume-monitor-daemon.c.utf8-mount 2009-07-07 06:10:24.000000000 -0400
+++ gnome-vfs-2.16.2/libgnomevfs/gnome-vfs-volume-monitor-daemon.c 2009-07-07 06:10:34.000000000 -0400
@@ -874,7 +874,7 @@ create_vol_from_mount (GnomeVFSVolumeMon
vol = g_object_new (GNOME_VFS_TYPE_VOLUME, NULL);
vol->priv->volume_type = GNOME_VFS_VOLUME_TYPE_MOUNTPOINT;
- vol->priv->device_path = g_strdup (mount->device_path);
+ vol->priv->device_path = make_utf8 (mount->device_path);
vol->priv->unix_device = 0; /* Caller must fill in. */
vol->priv->activation_uri = gnome_vfs_get_uri_from_local_path (mount->mount_path);
vol->priv->filesystem_type = g_strdup (mount->filesystem_type);

@ -14,7 +14,7 @@
Summary: The GNOME virtual file-system libraries Summary: The GNOME virtual file-system libraries
Name: gnome-vfs2 Name: gnome-vfs2
Version: 2.24.1 Version: 2.24.1
Release: 5%{?dist} Release: 6%{?dist}
License: LGPLv2+ and GPLv2+ License: LGPLv2+ and GPLv2+
# the daemon and the library are LGPLv2+ # the daemon and the library are LGPLv2+
# the modules are LGPLv2+ and GPLv2+ # the modules are LGPLv2+ and GPLv2+
@ -72,6 +72,18 @@ Patch6: gnome-vfs-2.15.91-mailto-command.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=335241 # https://bugzilla.redhat.com/show_bug.cgi?id=335241
Patch300: gnome-vfs-2.20.0-ignore-certain-mountpoints.patch Patch300: gnome-vfs-2.20.0-ignore-certain-mountpoints.patch
# backported from upstream
Patch400: gnome-vfs-2.24.xx-cdda-handle-invalid-data.patch
Patch401: gnome-vfs-2.24.xx-netware-mounts-as-non-local.patch
Patch402: gnome-vfs-2.24.xx-smb-64k-length.patch
Patch403: gnome-vfs-2.24.xx-uninitialized-struct.patch
# gnome-vfs-daemon exits on dbus, and constantly restarted causing dbus/hal to hog CPU
# https://bugzilla.redhat.com/show_bug.cgi?id=486286
Patch404: gnome-vfs-2.24.xx-utf8-mounts.patch
%description %description
GNOME VFS is the GNOME virtual file system. It is the foundation of GNOME VFS is the GNOME virtual file system. It is the foundation of
the Nautilus file manager. It provides a modular architecture and the Nautilus file manager. It provides a modular architecture and
@ -121,6 +133,12 @@ shares (SMB) to applications using GNOME VFS.
%patch300 -p1 -b .ignore-certain-mount-points %patch300 -p1 -b .ignore-certain-mount-points
%patch400 -p1 -b .cdda-invalid-data
%patch401 -p1 -b .netware
%patch402 -p1 -b .smb-64k
%patch403 -p1 -b .uninitialized-struct
%patch404 -p1 -b .utf8-mounts
# for patch 10 # for patch 10
autoheader autoheader
autoconf autoconf
@ -242,6 +260,9 @@ fi
%config %{_sysconfdir}/gnome-vfs-2.0/modules/smb-module.conf %config %{_sysconfdir}/gnome-vfs-2.0/modules/smb-module.conf
%changelog %changelog
* Tue Aug 4 2009 Tomas Bzatek <tbzatek@redhat.com> - 2.24.1-6
- Backport some upstream patches
* Mon Aug 3 2009 Tomas Bzatek <tbzatek@redhat.com> - 2.24.1-5 * Mon Aug 3 2009 Tomas Bzatek <tbzatek@redhat.com> - 2.24.1-5
- Fake POT-Creation-Date to prevent multilib issues (#514990) - Fake POT-Creation-Date to prevent multilib issues (#514990)

Loading…
Cancel
Save