From 9cd2ba2cb10c2b08e5e7ee0a836f7fd37395f7f3 Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Fri, 7 Aug 2009 14:58:36 +0800 Subject: [PATCH] s3: Unable to browse DFS when using kerberos in libsmbclient Signed-off-by: Bo Yang --- source/libsmb/libsmb_context.c | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/source/libsmb/libsmb_context.c b/source/libsmb/libsmb_context.c index ec16311..8e0aa1e 100644 --- a/source/libsmb/libsmb_context.c +++ b/source/libsmb/libsmb_context.c @@ -655,14 +655,23 @@ void smbc_set_credentials_with_fallback(SMBCCTX *context, smbc_bool use_kerberos = false; const char *signing_state = "off"; - if (!context || - ! workgroup || ! *workgroup || - ! user || ! *user || - ! password || ! *password) { + if (! context) { return; } + if (! workgroup || ! *workgroup) { + workgroup = smbc_getWorkgroup(context); + } + + if (! user) { + user = smbc_getUser(context); + } + + if (! password) { + password = ""; + } + if (smbc_getOptionUseKerberos(context)) { use_kerberos = True; } -- 1.5.3