diff options
author | Volker Lendecke <vlendec@samba.org> | 2003-08-11 20:40:39 +0000 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2003-08-11 20:40:39 +0000 |
commit | 76ecaa347ebffe0a713afe8d7fcdfdadc4cce6d5 (patch) | |
tree | f4b58325e8ba4cbfe7f37219ff794b3592ece623 /source3 | |
parent | 268a3593adf36cd9be3135ac84a12abda226b62f (diff) | |
download | samba-76ecaa347ebffe0a713afe8d7fcdfdadc4cce6d5.tar.gz samba-76ecaa347ebffe0a713afe8d7fcdfdadc4cce6d5.tar.bz2 samba-76ecaa347ebffe0a713afe8d7fcdfdadc4cce6d5.zip |
Fix a segfault in ntlm_auth when we can't find a domain or hostname.
Volker
(This used to be commit 49c4f8a764a2b9e266c33f018515e6a742cfc8b0)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/ntlmssp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/libsmb/ntlmssp.c b/source3/libsmb/ntlmssp.c index e76ad75e6e..37f5510c65 100644 --- a/source3/libsmb/ntlmssp.c +++ b/source3/libsmb/ntlmssp.c @@ -174,11 +174,13 @@ static NTSTATUS ntlmssp_server_negotiate(struct ntlmssp_state *ntlmssp_state, /* This should be a 'netbios domain -> DNS domain' mapping */ dnsdomname[0] = '\0'; - get_mydomname(dnsdomname); + if (!get_mydomname(dnsdomname)) + return NT_STATUS_INVALID_PARAMETER; strlower_m(dnsdomname); dnsname[0] = '\0'; - get_myfullname(dnsname); + if (!get_myfullname(dnsname)) + return NT_STATUS_INVALID_PARAMETER; strlower_m(dnsname); if (chal_flags & NTLMSSP_CHAL_TARGET_INFO) |