On Wed, 27 Nov 2013, Tomas Babej wrote:
daemons/ipa-slapi-plugins/ipa-cldap/ipa_cldap_netlogon.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/daemons/ipa-slapi-plugins/ipa-cldap/ipa_cldap_netlogon.c 
b/daemons/ipa-slapi-plugins/ipa-cldap/ipa_cldap_netlogon.c
index 
7d29fe559be55607fcb6b83fa521372e5197b848..c75b3fc792ef81e4bf7ce69da60675d133d373c5
 100644
--- a/daemons/ipa-slapi-plugins/ipa-cldap/ipa_cldap_netlogon.c
+++ b/daemons/ipa-slapi-plugins/ipa-cldap/ipa_cldap_netlogon.c
@@ -161,9 +161,13 @@ static int ipa_cldap_encode_netlogon(char *fq_hostname, 
char *domain,
    nlr->dns_domain = domain;
    nlr->pdc_dns_name = fq_hostname;
    nlr->domain_name = name;
-    pdc_name = talloc_asprintf(nlr, "\\\\%s", fq_hostname);
+
+    /* copy the first 15 characters of the fully qualified hostname*/
+    pdc_name = talloc_asprintf(nlr, "\\\\%s", 15, fq_hostname);
This will not work because you missed .* in the format line. Check
vsnprintf manpage.

--
/ Alexander Bokovoy

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to