summaryrefslogtreecommitdiff
path: root/source3
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
commit6f67ae667aabacbfc46faadfe2bb7bbe04dd049a (patch)
treed6b53499935382348ce0af8b2a98366d9bce3aea /source3
parent5b71a0055ffe619d7b2aaef453c39fcbc2b3f4e4 (diff)
downloadsamba-6f67ae667aabacbfc46faadfe2bb7bbe04dd049a.tar.gz
samba-6f67ae667aabacbfc46faadfe2bb7bbe04dd049a.tar.bz2
samba-6f67ae667aabacbfc46faadfe2bb7bbe04dd049a.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 (This used to be commit bb518a3bae3bf91a589021fcc5b1e715247c5ded)
Diffstat (limited to 'source3')
-rw-r--r--source3/libads/sasl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/libads/sasl.c b/source3/libads/sasl.c
index c110c1d2cd..f7dd01084a 100644
--- a/source3/libads/sasl.c
+++ b/source3/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;