s4:gensec/schannel: use the correct computer_name from netlogon_creds_CredentialState
authorStefan Metzmacher <metze@samba.org>
Fri, 2 Aug 2013 11:25:20 +0000 (13:25 +0200)
committerStefan Metzmacher <metze@samba.org>
Sat, 10 Aug 2013 07:19:00 +0000 (09:19 +0200)
We need to use the same computer_name we used in the netr_Authenticate3
request.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/auth/gensec/schannel.c

index 3896a41828b53a7d3f0d36887fabfaade9d3a299..91f166be38215a5b2d1362c1a85155ca23756738 100644 (file)
@@ -94,17 +94,17 @@ static NTSTATUS schannel_update(struct gensec_security *gensec_security, TALLOC_
                                      NL_FLAG_UTF8_DNS_DOMAIN_NAME |
                                      NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME;
                bind_schannel.oem_netbios_domain.a = cli_credentials_get_domain(gensec_security->credentials);
-               bind_schannel.oem_netbios_computer.a = cli_credentials_get_workstation(gensec_security->credentials);
+               bind_schannel.oem_netbios_computer.a = creds->computer_name;
                bind_schannel.utf8_dns_domain = cli_credentials_get_realm(gensec_security->credentials);
                /* w2k3 refuses us if we use the full DNS workstation?
                 why? perhaps because we don't fill in the dNSHostName
                 attribute in the machine account? */
-               bind_schannel.utf8_netbios_computer = cli_credentials_get_workstation(gensec_security->credentials);
+               bind_schannel.utf8_netbios_computer = creds->computer_name;
 #else
                bind_schannel.Flags = NL_FLAG_OEM_NETBIOS_DOMAIN_NAME |
                                      NL_FLAG_OEM_NETBIOS_COMPUTER_NAME;
                bind_schannel.oem_netbios_domain.a = cli_credentials_get_domain(gensec_security->credentials);
-               bind_schannel.oem_netbios_computer.a = cli_credentials_get_workstation(gensec_security->credentials);
+               bind_schannel.oem_netbios_computer.a = creds->computer_name;
 #endif
 
                ndr_err = ndr_push_struct_blob(out, out_mem_ctx, &bind_schannel,