parent
f220eb954a
commit
f898263047
@ -1,86 +0,0 @@
|
|||||||
From 4b9d9442f4b465e9403c4da399ccf6d7cc652eae Mon Sep 17 00:00:00 2001
|
|
||||||
From: Daniel Kolesa <dkolesa@igalia.com>
|
|
||||||
Date: Sun, 27 Mar 2022 16:01:55 +0200
|
|
||||||
Subject: [PATCH] dav: Do not lose userinfo when copying URIs
|
|
||||||
|
|
||||||
The use of g_uri_build was also bad, since otherwise we would
|
|
||||||
run into this: https://gitlab.gnome.org/GNOME/glib/-/issues/2619
|
|
||||||
|
|
||||||
While this should be fixed in glib, we need to work around this
|
|
||||||
behavior for existing installations.
|
|
||||||
|
|
||||||
Fixes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/614
|
|
||||||
---
|
|
||||||
daemon/gvfsbackenddav.c | 28 +++++++---------------------
|
|
||||||
1 file changed, 7 insertions(+), 21 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/daemon/gvfsbackenddav.c b/daemon/gvfsbackenddav.c
|
|
||||||
index f9d10a40..3ece9a5f 100644
|
|
||||||
--- a/daemon/gvfsbackenddav.c
|
|
||||||
+++ b/daemon/gvfsbackenddav.c
|
|
||||||
@@ -321,23 +321,6 @@ message_should_apply_redir_ref (SoupMessage *msg)
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
-static GUri *
|
|
||||||
-dav_uri_dup_with (GUri *uri, const char *path, const char *userinfo)
|
|
||||||
-{
|
|
||||||
- if (!path && !userinfo)
|
|
||||||
- return g_uri_ref (uri);
|
|
||||||
-
|
|
||||||
- return g_uri_build (g_uri_get_flags (uri),
|
|
||||||
- g_uri_get_scheme (uri),
|
|
||||||
- userinfo ? userinfo : g_uri_get_userinfo (uri),
|
|
||||||
- g_uri_get_host (uri),
|
|
||||||
- g_uri_get_port (uri),
|
|
||||||
- path ? path : g_uri_get_path (uri),
|
|
||||||
- g_uri_get_query (uri),
|
|
||||||
- g_uri_get_fragment (uri));
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-
|
|
||||||
static GUri *
|
|
||||||
g_vfs_backend_dav_uri_for_path (GVfsBackend *backend,
|
|
||||||
const char *path,
|
|
||||||
@@ -369,7 +352,7 @@ g_vfs_backend_dav_uri_for_path (GVfsBackend *backend,
|
|
||||||
else
|
|
||||||
new_path = g_build_path ("/", g_uri_get_path (mount_base), fn_encoded, "/", NULL);
|
|
||||||
|
|
||||||
- uri = dav_uri_dup_with (mount_base, new_path, NULL);
|
|
||||||
+ uri = soup_uri_copy (mount_base, SOUP_URI_PATH, new_path, SOUP_URI_NONE);
|
|
||||||
|
|
||||||
g_free (fn_encoded);
|
|
||||||
g_free (new_path);
|
|
||||||
@@ -432,7 +415,10 @@ g_vfs_backend_dav_redirect (SoupSession *session,
|
|
||||||
}
|
|
||||||
|
|
||||||
tmp = new_uri;
|
|
||||||
- new_uri = dav_uri_dup_with (new_uri, NULL, g_uri_get_userinfo (old_uri));
|
|
||||||
+ new_uri = soup_uri_copy (new_uri,
|
|
||||||
+ SOUP_URI_USER, g_uri_get_user (old_uri),
|
|
||||||
+ SOUP_URI_AUTH_PARAMS, g_uri_get_auth_params (old_uri),
|
|
||||||
+ SOUP_URI_NONE);
|
|
||||||
g_uri_unref (tmp);
|
|
||||||
|
|
||||||
/* Check if this is a trailing slash redirect (i.e. /a/b to /a/b/),
|
|
||||||
@@ -2141,7 +2127,7 @@ do_mount (GVfsBackend *backend,
|
|
||||||
new_path = path_get_parent_dir (last_good_path);
|
|
||||||
|
|
||||||
tmp = mount_base;
|
|
||||||
- mount_base = dav_uri_dup_with (mount_base, new_path, NULL);
|
|
||||||
+ mount_base = soup_uri_copy (mount_base, SOUP_URI_PATH, new_path, SOUP_URI_NONE);
|
|
||||||
g_uri_unref (tmp);
|
|
||||||
G_VFS_BACKEND_HTTP (backend)->mount_base = mount_base;
|
|
||||||
|
|
||||||
@@ -2222,7 +2208,7 @@ do_mount (GVfsBackend *backend,
|
|
||||||
|
|
||||||
/* Set the working path in mount path */
|
|
||||||
tmp = mount_base;
|
|
||||||
- mount_base = dav_uri_dup_with (mount_base, last_good_path, NULL);
|
|
||||||
+ mount_base = soup_uri_copy (mount_base, SOUP_URI_PATH, last_good_path, SOUP_URI_NONE);
|
|
||||||
g_uri_unref (tmp);
|
|
||||||
G_VFS_BACKEND_HTTP (backend)->mount_base = mount_base;
|
|
||||||
g_free (last_good_path);
|
|
||||||
--
|
|
||||||
2.35.1
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
|||||||
From 2b5e3453ee0ab504eeecb8dbe76015e98ccbfcfb Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ondrej Holy <oholy@redhat.com>
|
|
||||||
Date: Wed, 23 Mar 2022 16:23:49 +0100
|
|
||||||
Subject: [PATCH] dav: Fix crashes caused by extra unref
|
|
||||||
|
|
||||||
The `mount_base` uri is unreffed twice. First time over the local `mount_base`
|
|
||||||
pointer and for the second time over the `G_VFS_BACKEND_HTTP (backend)->mount_base`
|
|
||||||
pointer. This leads to `SIGABRT` from the `__pthread_kill_implementation`
|
|
||||||
function. Let's remove that extra unref to fix this crashes.
|
|
||||||
|
|
||||||
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2066717
|
|
||||||
---
|
|
||||||
daemon/gvfsbackenddav.c | 1 -
|
|
||||||
1 file changed, 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/daemon/gvfsbackenddav.c b/daemon/gvfsbackenddav.c
|
|
||||||
index 559b8657..f9d10a40 100644
|
|
||||||
--- a/daemon/gvfsbackenddav.c
|
|
||||||
+++ b/daemon/gvfsbackenddav.c
|
|
||||||
@@ -2224,7 +2224,6 @@ do_mount (GVfsBackend *backend,
|
|
||||||
tmp = mount_base;
|
|
||||||
mount_base = dav_uri_dup_with (mount_base, last_good_path, NULL);
|
|
||||||
g_uri_unref (tmp);
|
|
||||||
- g_clear_pointer (&G_VFS_BACKEND_HTTP (backend)->mount_base, g_uri_unref);
|
|
||||||
G_VFS_BACKEND_HTTP (backend)->mount_base = mount_base;
|
|
||||||
g_free (last_good_path);
|
|
||||||
|
|
||||||
--
|
|
||||||
2.35.1
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
18
gvfs.spec
18
gvfs.spec
@ -21,25 +21,14 @@
|
|||||||
%global udisks2_version 1.97
|
%global udisks2_version 1.97
|
||||||
|
|
||||||
Name: gvfs
|
Name: gvfs
|
||||||
Version: 1.50.0
|
Version: 1.50.1
|
||||||
Release: 4%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Backends for the gio framework in GLib
|
Summary: Backends for the gio framework in GLib
|
||||||
|
|
||||||
License: GPLv3 and LGPLv2+ and BSD and MPLv2.0
|
License: GPLv3 and LGPLv2+ and BSD and MPLv2.0
|
||||||
URL: https://wiki.gnome.org/Projects/gvfs
|
URL: https://wiki.gnome.org/Projects/gvfs
|
||||||
Source0: https://download.gnome.org/sources/gvfs/1.50/gvfs-%{version}.tar.xz
|
Source0: https://download.gnome.org/sources/gvfs/1.50/gvfs-%{version}.tar.xz
|
||||||
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2066717
|
|
||||||
Patch0: dav-Fix-crashes-caused-by-extra-unref.patch
|
|
||||||
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2062465
|
|
||||||
Patch1: dav-Do-not-lose-userinfo-when-copying-URIs.patch
|
|
||||||
Patch2: dav-Rewrite-to-libsoup-async-API-to-fix-crashes.patch
|
|
||||||
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2068976
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2072885
|
|
||||||
Patch3: smb-Ignore-EINVAL-for-kerberos-ccache-login.patch
|
|
||||||
|
|
||||||
BuildRequires: meson
|
BuildRequires: meson
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version}
|
BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version}
|
||||||
@ -432,6 +421,9 @@ killall -USR1 gvfsd >&/dev/null || :
|
|||||||
%{_datadir}/installed-tests
|
%{_datadir}/installed-tests
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Apr 26 2022 Ondrej Holy <oholy@redhat.com> - 1.50.1-1
|
||||||
|
- Update to 1.50.1 (#2078857)
|
||||||
|
|
||||||
* Wed Apr 13 2022 Ondrej Holy <oholy@redhat.com> - 1.50.0-4
|
* Wed Apr 13 2022 Ondrej Holy <oholy@redhat.com> - 1.50.0-4
|
||||||
- Ignore EINVAL for kerberos/ccache login to fix SMB mounting (#2068976, #2072885)
|
- Ignore EINVAL for kerberos/ccache login to fix SMB mounting (#2068976, #2072885)
|
||||||
|
|
||||||
|
@ -1,58 +0,0 @@
|
|||||||
From 747c7f6ea6c8b6a7ccd008bb47996ba7eb169bcc Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ondrej Holy <oholy@redhat.com>
|
|
||||||
Date: Mon, 11 Apr 2022 10:54:04 +0200
|
|
||||||
Subject: [PATCH] smb: Ignore EINVAL for kerberos/ccache login
|
|
||||||
|
|
||||||
With samba 4.16.0, mount operation fails with the "Invalid Argument" error
|
|
||||||
when kerberos/ccache is misconfigured. Ignore this error, so user get a chance
|
|
||||||
to login using the password...
|
|
||||||
|
|
||||||
Fixes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/611
|
|
||||||
---
|
|
||||||
daemon/gvfsbackendsmb.c | 8 +++++++-
|
|
||||||
daemon/gvfsbackendsmbbrowse.c | 10 ++++++++--
|
|
||||||
2 files changed, 15 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/daemon/gvfsbackendsmb.c b/daemon/gvfsbackendsmb.c
|
|
||||||
index 33d1a209..776b67bc 100644
|
|
||||||
--- a/daemon/gvfsbackendsmb.c
|
|
||||||
+++ b/daemon/gvfsbackendsmb.c
|
|
||||||
@@ -513,7 +513,13 @@ do_mount (GVfsBackend *backend,
|
|
||||||
if (res == 0)
|
|
||||||
break;
|
|
||||||
|
|
||||||
- if (op_backend->mount_cancelled || (errsv != EACCES && errsv != EPERM))
|
|
||||||
+ if (errsv == EINVAL && op_backend->mount_try <= 1 && op_backend->user == NULL)
|
|
||||||
+ {
|
|
||||||
+ /* EINVAL is "expected" when kerberos/ccache is misconfigured, see:
|
|
||||||
+ * https://gitlab.gnome.org/GNOME/gvfs/-/issues/611
|
|
||||||
+ */
|
|
||||||
+ }
|
|
||||||
+ else if (op_backend->mount_cancelled || (errsv != EACCES && errsv != EPERM))
|
|
||||||
{
|
|
||||||
g_debug ("do_mount - (errno != EPERM && errno != EACCES), cancelled = %d, breaking\n", op_backend->mount_cancelled);
|
|
||||||
break;
|
|
||||||
diff --git a/daemon/gvfsbackendsmbbrowse.c b/daemon/gvfsbackendsmbbrowse.c
|
|
||||||
index 57bae9db..7e8facfb 100644
|
|
||||||
--- a/daemon/gvfsbackendsmbbrowse.c
|
|
||||||
+++ b/daemon/gvfsbackendsmbbrowse.c
|
|
||||||
@@ -967,8 +967,14 @@ do_mount (GVfsBackend *backend,
|
|
||||||
uri, op_backend->mount_try, dir, op_backend->mount_cancelled,
|
|
||||||
errsv, g_strerror (errsv));
|
|
||||||
|
|
||||||
- if (dir == NULL &&
|
|
||||||
- (op_backend->mount_cancelled || (errsv != EPERM && errsv != EACCES)))
|
|
||||||
+ if (errsv == EINVAL && op_backend->mount_try == 0 && op_backend->user == NULL)
|
|
||||||
+ {
|
|
||||||
+ /* EINVAL is "expected" when kerberos is misconfigured, see:
|
|
||||||
+ * https://gitlab.gnome.org/GNOME/gvfs/-/issues/611
|
|
||||||
+ */
|
|
||||||
+ }
|
|
||||||
+ else if (dir == NULL &&
|
|
||||||
+ (op_backend->mount_cancelled || (errsv != EPERM && errsv != EACCES)))
|
|
||||||
{
|
|
||||||
g_debug ("do_mount - (errno != EPERM && errno != EACCES), cancelled = %d, breaking\n", op_backend->mount_cancelled);
|
|
||||||
break;
|
|
||||||
--
|
|
||||||
2.35.1
|
|
||||||
|
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (gvfs-1.50.0.tar.xz) = 6eea3c59b239fe9674a83db4e182c0ea2ab7d56e29f5d5c4a7af9cb3cb0fd9222721796754f2f502291049c158e8bd3771cbc5262d10bfa684c207cb3281dcce
|
SHA512 (gvfs-1.50.1.tar.xz) = 7a1ea47658dbd74673e1aea7c344d3f9e8a26fab844a26220cedcb19da6b4a0cac6b369d2b5107f649d6e7b2331894c89df04c6dce3630be4b289e23f56127a5
|
||||||
|
Loading…
Reference in New Issue
Block a user