summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2019-02-14 15:06:06 +0100
committerOndrej Holy <oholy@redhat.com>2019-02-18 14:44:29 +0000
commitc91c5f73a166080ead12874b25a577075f8c399e (patch)
treed10542806d0e36f747f0d2ea061fbb75dee3fa2b
parent86b1abb362532fdd28de89cef237977ef4f1a947 (diff)
downloadgvfs-c91c5f73a166080ead12874b25a577075f8c399e.tar.gz
smb: Do not show password prompt when using winbind ccache
Recent samba releases seems invoke auth_callback even when using cached winbind credentials. It shows password prompt to user, which is unexpected. Add one more iteration in the mount procedure just for ccache. This will unfortunately make one fail attempt if the winbind ccache is not configured, but I don't see better way to fix this. Closes: https://gitlab.gnome.org/GNOME/gvfs/issues/369
-rw-r--r--daemon/gvfsbackendsmb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/daemon/gvfsbackendsmb.c b/daemon/gvfsbackendsmb.c
index bb105c30..0292768c 100644
--- a/daemon/gvfsbackendsmb.c
+++ b/daemon/gvfsbackendsmb.c
@@ -206,6 +206,14 @@ auth_callback (SMBCCTX *context,
backend->mount_try_again = TRUE;
g_debug ("auth_callback - kerberos pass\n");
}
+ else if (backend->mount_try == 1 &&
+ backend->user == NULL &&
+ backend->domain == NULL)
+ {
+ /* Try again if ccache login fails */
+ backend->mount_try_again = TRUE;
+ g_debug ("auth_callback - ccache pass\n");
+ }
else if (backend->use_anonymous)
{
/* Try again if anonymous login fails */