From: Bo Yang Date: Fri, 7 Aug 2009 05:42:51 +0000 (+0800) Subject: Unable to browse DFS when using kerberos X-Git-Tag: talloc-2.0.0~464^2~47 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=857140a79fb9cd186ed7f33aaf92934080256a3c;p=thirdparty%2Fsamba.git Unable to browse DFS when using kerberos Signed-off-by: Bo Yang --- diff --git a/source3/libsmb/libsmb_context.c b/source3/libsmb/libsmb_context.c index 8b22ee5023c..78c9a551a68 100644 --- a/source3/libsmb/libsmb_context.c +++ b/source3/libsmb/libsmb_context.c @@ -692,22 +692,28 @@ void smbc_set_credentials_with_fallback(SMBCCTX *context, { smbc_bool use_kerberos = false; const char *signing_state = "off"; - struct user_auth_info *auth_info = user_auth_info_init(NULL); + struct user_auth_info *auth_info = NULL; - if (auth_info) { + if (! context) { + + return; + } + + if (! workgroup || ! *workgroup) { + workgroup = smbc_getWorkgroup(context); } - if (! context || - ! workgroup || ! *workgroup || - ! user || ! *user || - ! password || ! *password) { + if (! user) { + user = smbc_getUser(context); + } - return; + if (! password) { + password = ""; } auth_info = user_auth_info_init(NULL); - if (auth_info) { + if (! auth_info) { DEBUG(0, ("smbc_set_credentials_with_fallback: allocation fail\n")); return; }