From b67085de7fdfb41c42c71438f2e4b5474b3b111a Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Tue, 27 Sep 2011 14:06:03 -0400 Subject: s4-netlogon: honnor DS_RETURN_DNS_NAME flag Reviewed-By: Andrew Bartlett --- source4/rpc_server/netlogon/dcerpc_netlogon.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c index d916107897..de8f0e5ac0 100644 --- a/source4/rpc_server/netlogon/dcerpc_netlogon.c +++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c @@ -1857,6 +1857,15 @@ static WERROR dcesrv_netr_DsRGetDCNameEx2(struct dcesrv_call_state *dce_call, info->domain_name = domain_name; info->forest_name = response.data.nt5_ex.forest; info->dc_flags = response.data.nt5_ex.server_type; + if (r->in.flags & DS_RETURN_DNS_NAME) { + /* As MS-NRPC.pdf in 2.2.1.2.1 the DS_DNS_CONTROLLER flag should be + * returned if we are returning info->dc_unc containing a FQDN. + * This attribute is called DomainControllerName in the specs, + * it seems that we decide to return FQDN or netbios depending on + * DS_RETURN_DNS_NAME. + */ + info->dc_flags |= DS_DNS_CONTROLLER; + } info->dc_site_name = response.data.nt5_ex.server_site; info->client_site_name = response.data.nt5_ex.client_site; -- cgit