s3-libsmb: Set the netbios_name in use_ccache case too.
authorAndreas Schneider <asn@samba.org>
Fri, 14 Nov 2014 09:03:07 +0000 (10:03 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 2 Dec 2014 18:23:05 +0000 (19:23 +0100)
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@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source3/libsmb/ntlmssp.c

index e8c9ebfe7202de22560c49762d7c20d9f404def8..0a62b8b11b4c31057675f1b7bb4a58ea59e59121 100644 (file)
@@ -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;