summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/client/smbspool.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c
index 245775bf6a..af2f7e9180 100644
--- a/source3/client/smbspool.c
+++ b/source3/client/smbspool.c
@@ -375,9 +375,14 @@ static struct cli_state
return NULL;
}
-
+ /* We pretty much guarentee password must be valid or a pointer
+ to a 0 char. */
+ if (!password) {
+ return NULL;
+ }
+
if ( (username) && (*username) &&
- ((!password) || ((password) && (strlen(password) == 0 ))) &&
+ (strlen(password) == 0 ) &&
(cli->use_kerberos) )
{
/* Use kerberos authentication */