diff options
author | Volker Lendecke <vl@samba.org> | 2008-02-29 22:38:10 +0100 |
---|---|---|
committer | Karolin Seeger <ks@sernet.de> | 2008-03-03 11:40:12 +0100 |
commit | f247b78eb9db8f85f31d8fd07f2cfbd03c819d14 (patch) | |
tree | cc06d1e28f752fdb8b7ef5797c9d2bb4d8a65cf9 | |
parent | 2e7eb4d023f8b284121ae380091363ba25d0a3e4 (diff) | |
download | samba-f247b78eb9db8f85f31d8fd07f2cfbd03c819d14.tar.gz samba-f247b78eb9db8f85f31d8fd07f2cfbd03c819d14.tar.bz2 samba-f247b78eb9db8f85f31d8fd07f2cfbd03c819d14.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 4170259e5f83c281966a80916e4ece6937e08988)
-rw-r--r-- | source3/libsmb/ntlmssp.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/libsmb/ntlmssp.c b/source3/libsmb/ntlmssp.c index 35c20ed647..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 (!dnsdomname) { - return NT_STATUS_INVALID_COMPUTER_NAME; + if (!dnsname) { + dnsname = ""; } /* This creates the 'blob' of names that appears at the end of the packet */ |