On 26.11.2013 15:37, Tomas Babej wrote:
Hi,
The CLDAP DS plugin uses the uppercased first segment of the fully
qualified hostname as the NetBIOS name. We need to limit its size
to 15 characters.
https://fedorahosted.org/freeipa/ticket/4028
I don't think you need to copy the whole fq_hostname if you need only
the few initial characters, you can do something like this instead
(OTOH, untested):
- char *pdc_name;
+ char pdc_name[16];
...
- pdc_name = talloc_asprintf(nlr, "\\\\%s", fq_hostname);
+ snprintf(pdc_name, 16, "\\\\%s", fq_hostname);
+ pdc_name[15] = '\0';
...
- nlr->pdc_name = pdc_name;
+ nlr->pdc_name = talloc_strdup(nlr, pdc_name);
Honza
--
Jan Cholasta
_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel