summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-09-21 16:30:31 -0700
committerAndrew Tridgell <tridge@samba.org>2009-09-23 14:01:28 -0700
commit87b6f2e863c6e117643ab6704e50167e849b69cc (patch)
tree2f5093eb5722d3278912af40dc32513c23ea4d06
parentb60854ec46dc4b9243cff0a59a7e36ac6537d771 (diff)
downloadsamba-87b6f2e863c6e117643ab6704e50167e849b69cc.tar.gz
samba-87b6f2e863c6e117643ab6704e50167e849b69cc.tar.bz2
samba-87b6f2e863c6e117643ab6704e50167e849b69cc.zip
s4-netlogon: always set the dNSHostName in GetDomainInfo
This seems to be what w2k8 does
-rw-r--r--source4/rpc_server/netlogon/dcerpc_netlogon.c10
1 files changed, 7 insertions, 3 deletions
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.
@@ -1241,9 +1248,6 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_cal
& 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",
r->in.computer_name)