diff options
author | Ondrej Holy <oholy@redhat.com> | 2022-04-11 10:54:04 +0200 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2022-04-13 10:01:06 +0200 |
commit | 747c7f6ea6c8b6a7ccd008bb47996ba7eb169bcc (patch) | |
tree | fd025fc04e90046a8996533e50b774a4939834e4 /daemon/gvfsbackendsmb.c | |
parent | 9203fad575515fba715fcfc0cc8b08d01ef11737 (diff) | |
download | gvfs-747c7f6ea6c8b6a7ccd008bb47996ba7eb169bcc.tar.gz |
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
Diffstat (limited to 'daemon/gvfsbackendsmb.c')
-rw-r--r-- | daemon/gvfsbackendsmb.c | 8 |
1 files changed, 7 insertions, 1 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; |