9991ea
From 198f16c26e36bd8b4b7d55a74bb679a6daa85084 Mon Sep 17 00:00:00 2001
9991ea
From: Sumit Bose <sbose@redhat.com>
9991ea
Date: Mon, 13 Jan 2014 10:43:33 +0100
9991ea
Subject: [PATCH 25/25] CLDAP: do not prepend \\
9991ea
9991ea
For NETLOGON_NT_VERSION_5EX requests the prepended \\ is not expected in
9991ea
the PDC NetBIOS name. In general AD seems to be smart enough to handle
9991ea
the two \ signs. But if the NetBIOS name reaches the maximum of 15
9991ea
character AD does not accept the responses anymore.
9991ea
9991ea
Fixes https://fedorahosted.org/freeipa/ticket/4028
9991ea
---
9991ea
 daemons/ipa-slapi-plugins/ipa-cldap/ipa_cldap_netlogon.c | 2 +-
9991ea
 1 file changed, 1 insertion(+), 1 deletion(-)
9991ea
9991ea
diff --git a/daemons/ipa-slapi-plugins/ipa-cldap/ipa_cldap_netlogon.c b/daemons/ipa-slapi-plugins/ipa-cldap/ipa_cldap_netlogon.c
9991ea
index 9ba05829418a0d1de46f2c7776cc15c54a9eab1c..c03172d474589ddee84f1cfa5395c23fdba83bcb 100644
9991ea
--- a/daemons/ipa-slapi-plugins/ipa-cldap/ipa_cldap_netlogon.c
9991ea
+++ b/daemons/ipa-slapi-plugins/ipa-cldap/ipa_cldap_netlogon.c
9991ea
@@ -163,7 +163,7 @@ static int ipa_cldap_encode_netlogon(char *fq_hostname, char *domain,
9991ea
     nlr->domain_name = name;
9991ea
 
9991ea
     /* copy the first 15 characters of the fully qualified hostname*/
9991ea
-    pdc_name = talloc_asprintf(nlr, "\\\\%.*s", NETBIOS_NAME_MAX, fq_hostname);
9991ea
+    pdc_name = talloc_asprintf(nlr, "%.*s", NETBIOS_NAME_MAX, fq_hostname);
9991ea
 
9991ea
     for (p = pdc_name; *p; p++) {
9991ea
         /* Create the NetBIOS name from the first segment of the hostname */
9991ea
-- 
9991ea
1.8.4.2
9991ea