diff options
author | Volker Lendecke <vl@samba.org> | 2008-02-29 22:38:10 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-02-29 22:39:45 +0100 |
commit | 5e0d86c4076f9b04a2c79ab47b497924248050aa (patch) | |
tree | d48947093562ff0cbb0900eac26689eb92367d2b /source3 | |
parent | 45615d62838123bdf620a9c409d9868d47977800 (diff) | |
download | samba-5e0d86c4076f9b04a2c79ab47b497924248050aa.tar.gz samba-5e0d86c4076f9b04a2c79ab47b497924248050aa.tar.bz2 samba-5e0d86c4076f9b04a2c79ab47b497924248050aa.zip |
Restore 3.0 behaviour with empty /etc/hosts
Jeremy, in 3.0 we allowed get_mydnsdomname and get_mydnsfullname to fail
without filling in anything useful. Worked fine. Without this patch and a empty
/etc/hosts and no DNS configured, session setup would return
NT_STATUS_BAD_NETWORK_NAME. This is confusing at best, BAD_NETWORK_NAME afaik
is only ever returned from tcon normally.
This restores the 3.0 behaviour.
Comments?
Volker
(This used to be commit 2bd3b7d474768f842921945d283eac10da2a1684)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/ntlmssp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/libsmb/ntlmssp.c b/source3/libsmb/ntlmssp.c index 8355669d9f..7082ea7e4e 100644 --- a/source3/libsmb/ntlmssp.c +++ b/source3/libsmb/ntlmssp.c @@ -566,13 +566,16 @@ static NTSTATUS ntlmssp_server_negotiate(struct ntlmssp_state *ntlmssp_state, /* This should be a 'netbios domain -> DNS domain' mapping */ dnsdomname = get_mydnsdomname(ntlmssp_state->mem_ctx); if (!dnsdomname) { - return NT_STATUS_BAD_NETWORK_NAME; + dnsdomname = talloc_strdup(ntlmssp_state->mem_ctx, ""); + } + if (!dnsdomname) { + return NT_STATUS_NO_MEMORY; } strlower_m(dnsdomname); dnsname = get_mydnsfullname(); if (!dnsname) { - return NT_STATUS_INVALID_COMPUTER_NAME; + dnsname = ""; } /* This creates the 'blob' of names that appears at the end of the packet */ |