[PATCH 2/3] s3-libsmb: Set the netbios_name in use_ccache case too.

Andreas Schneider asn at samba.org
Fri Nov 14 09:48:15 MST 2014


If we do not set the netbios_name we are not able to connect to a
Windows DC.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10279

Signed-off-by: Andreas Schneider <asn at samba.org>
---
 source3/libsmb/ntlmssp.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/source3/libsmb/ntlmssp.c b/source3/libsmb/ntlmssp.c
index e8c9ebf..0a62b8b 100644
--- a/source3/libsmb/ntlmssp.c
+++ b/source3/libsmb/ntlmssp.c
@@ -383,6 +383,15 @@ static NTSTATUS ntlmssp3_client_challenge(struct ntlmssp_state *ntlmssp_state,
 		wbcErr wbc_status;
 		int i;
 
+		/*
+		 * We need to set the netbios name or we are not able to connect
+		 *  a Windows DC.
+		 */
+		if (ntlmssp_state->server.netbios_domain == NULL ||
+		    ntlmssp_state->server.netbios_domain[0] == '\0') {
+			ntlmssp_state->server.netbios_domain = ntlmssp_state->domain;
+		}
+
 		params.account_name = ntlmssp_state->user;
 		params.domain_name = ntlmssp_state->domain;
 		params.level = WBC_CREDENTIAL_CACHE_LEVEL_NTLMSSP;
-- 
2.1.2




More information about the samba-technical mailing list