s4-netlogon: do not add \\ it has already be done in the fill_netlogon_samlogon_response
authorMatthieu Patou <mat@matws.net>
Mon, 26 Sep 2011 22:54:04 +0000 (18:54 -0400)
committerMatthieu Patou <mat@matws.net>
Wed, 7 Aug 2013 04:21:47 +0000 (21:21 -0700)
Reviewed-By: Andrew Bartlett <abarlett@samba.org>
source4/rpc_server/netlogon/dcerpc_netlogon.c

index 5cc3b34dbf33ca6556ada17defe78662df2de01c..d9161078976b253c44d10f1539097ed2cd7ccb0c 100644 (file)
@@ -1840,7 +1840,9 @@ static WERROR dcesrv_netr_DsRGetDCNameEx2(struct dcesrv_call_state *dce_call,
 
        info = talloc(mem_ctx, struct netr_DsRGetDCNameInfo);
        W_ERROR_HAVE_NO_MEMORY(info);
-       info->dc_unc           = talloc_asprintf(mem_ctx, "\\\\%s", dc_name);
+       info->dc_unc = talloc_asprintf(mem_ctx, "%s%s",
+                       dc_name[0] == '\\'? "\\\\":"",
+                       talloc_strdup(mem_ctx, dc_name));
        W_ERROR_HAVE_NO_MEMORY(info->dc_unc);
 
        load_interface_list(mem_ctx, lp_ctx, &ifaces);