From 87b6f2e863c6e117643ab6704e50167e849b69cc Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 21 Sep 2009 16:30:31 -0700 Subject: s4-netlogon: always set the dNSHostName in GetDomainInfo This seems to be what w2k8 does --- source4/rpc_server/netlogon/dcerpc_netlogon.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'source4/rpc_server') diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c index 1a5b9916be..1a45711c57 100644 --- a/source4/rpc_server/netlogon/dcerpc_netlogon.c +++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c @@ -1210,6 +1210,13 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_cal "operatingSystem", r->in.query->workstation_info->os_name.string); + if (r->in.query->workstation_info->dns_hostname) { + /* TODO: should this always be done? */ + samdb_msg_add_string(sam_ctx, mem_ctx, new_msg, + "dNSHostname", + r->in.query->workstation_info->dns_hostname); + } + /* * Sets informations from "os_version". On a empty structure * the values are cleared. @@ -1240,9 +1247,6 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_cal if ((r->in.query->workstation_info->workstation_flags & NETR_WS_FLAG_HANDLES_SPN_UPDATE) == 0) { - samdb_msg_add_string(sam_ctx, mem_ctx, new_msg, - "dNSHostname", - r->in.query->workstation_info->dns_hostname); samdb_msg_add_string(sam_ctx, mem_ctx, new_msg, "servicePrincipalName", talloc_asprintf(mem_ctx, "HOST/%s", -- cgit