[gvfs/wip/oholy/smb-einval] smb: Ignore EINVAL for kerberos/ccache login
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs/wip/oholy/smb-einval] smb: Ignore EINVAL for kerberos/ccache login
- Date: Tue, 12 Apr 2022 07:25:50 +0000 (UTC)
commit c1e6c93fe8926ab52f2392dd0ff3cdc19ea07db0
Author: Ondrej Holy <oholy redhat com>
Date: Mon Apr 11 10:54:04 2022 +0200
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 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/daemon/gvfsbackendsmb.c b/daemon/gvfsbackendsmb.c
index 33d1a209..dbb167f6 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]