diff options
author | Alexander Bokovoy <ab@samba.org> | 2009-08-08 08:07:24 +0300 |
---|---|---|
committer | Alexander Bokovoy <ab@samba.org> | 2009-08-08 08:07:24 +0300 |
commit | 8eac1896299d820fec0fd92b2b8b6a058ae39642 (patch) | |
tree | f97b0a2c21eb4f91aa51cb2af4381287c3525727 /source3/libsmb | |
parent | 217e3086c74eb0b46fab512b5887d9a5a5b7ee9a (diff) | |
parent | d296c774c5981baa863c697782dba1b6280d632e (diff) | |
download | samba-8eac1896299d820fec0fd92b2b8b6a058ae39642.tar.gz samba-8eac1896299d820fec0fd92b2b8b6a058ae39642.tar.bz2 samba-8eac1896299d820fec0fd92b2b8b6a058ae39642.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/libsmb_context.c | 22 |
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; } |