summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2003-08-11 20:40:39 +0000
committerVolker Lendecke <vlendec@samba.org>2003-08-11 20:40:39 +0000
commit76ecaa347ebffe0a713afe8d7fcdfdadc4cce6d5 (patch)
treef4b58325e8ba4cbfe7f37219ff794b3592ece623 /source3/libsmb
parent268a3593adf36cd9be3135ac84a12abda226b62f (diff)
downloadsamba-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/libsmb')
-rw-r--r--source3/libsmb/ntlmssp.c6
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)