summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorBo Yang <boyang@samba.org>2009-08-07 13:42:51 +0800
committerBo Yang <boyang@samba.org>2009-08-07 13:47:14 +0800
commit857140a79fb9cd186ed7f33aaf92934080256a3c (patch)
treeed2a366fdb9cdfb170829fa39ac9b1ab79e83774 /source3/libsmb
parent915b789c874e661dbd240e1fe3ba35f67746fdd0 (diff)
downloadsamba-857140a79fb9cd186ed7f33aaf92934080256a3c.tar.gz
samba-857140a79fb9cd186ed7f33aaf92934080256a3c.tar.bz2
samba-857140a79fb9cd186ed7f33aaf92934080256a3c.zip
Unable to browse DFS when using kerberos
Signed-off-by: Bo Yang <boyang@samba.org>
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/libsmb_context.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/source3/libsmb/libsmb_context.c b/source3/libsmb/libsmb_context.c
index 8b22ee5023..78c9a551a6 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;
}