summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-09-25 09:32:08 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-09-25 09:32:08 +0000
commitbb518a3bae3bf91a589021fcc5b1e715247c5ded (patch)
tree793d84e2f1815a7191c5a0470e65bd154c42e0e7 /source
parent7ce782c20c6b9e515a2fa831315ae14c66d322ee (diff)
downloadsamba-bb518a3bae3bf91a589021fcc5b1e715247c5ded.tar.gz
samba-bb518a3bae3bf91a589021fcc5b1e715247c5ded.tar.xz
samba-bb518a3bae3bf91a589021fcc5b1e715247c5ded.zip
Avoid a segfault in net join when you have not done an kinit, and it's falling
back to NTLMSSP. We need to get the password out of the user, and this eventually does. Andrew Bartlett
Diffstat (limited to 'source')
-rw-r--r--source/libads/sasl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/libads/sasl.c b/source/libads/sasl.c
index c110c1d2cd7..f7dd01084a2 100644
--- a/source/libads/sasl.c
+++ b/source/libads/sasl.c
@@ -39,6 +39,11 @@ static ADS_STATUS ads_sasl_spnego_ntlmssp_bind(ADS_STRUCT *ads)
extern pstring global_myname;
int rc;
+ if (!ads->auth.password) {
+ /* No password, don't segfault below... */
+ return ADS_ERROR_NT(NT_STATUS_LOGON_FAILURE);
+ }
+
neg_flags = NTLMSSP_NEGOTIATE_UNICODE |
NTLMSSP_NEGOTIATE_128 |
NTLMSSP_NEGOTIATE_NTLM;