[gvfs/wip/oholy/smb-ccache: 11/12] smb: Do not show password prompt when using winbind ccache
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs/wip/oholy/smb-ccache: 11/12] smb: Do not show password prompt when using winbind ccache
- Date: Mon, 18 Feb 2019 14:44:49 +0000 (UTC)
commit c91c5f73a166080ead12874b25a577075f8c399e
Author: Ondrej Holy <oholy redhat com>
Date: Thu Feb 14 15:06:06 2019 +0100
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
daemon/gvfsbackendsmb.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
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 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]