Re: [Freeipa-devel] [PATCH 0133] ipa-cldap: Cut NetBIOS name after 15 characters

2013-12-11 Thread Tomas Babej
On 11/27/2013 03:38 PM, Simo Sorce wrote: On Wed, 2013-11-27 at 08:50 +0100, Tomas Babej wrote: Sorry to nitpick but ... 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

Re: [Freeipa-devel] [PATCH 0133] ipa-cldap: Cut NetBIOS name after 15 characters

2013-12-11 Thread Alexander Bokovoy
On Wed, 11 Dec 2013, Tomas Babej wrote: On 11/27/2013 03:38 PM, Simo Sorce wrote: On Wed, 2013-11-27 at 08:50 +0100, Tomas Babej wrote: Sorry to nitpick but ... diff --git a/daemons/ipa-slapi-plugins/ipa-cldap/ipa_cldap_netlogon.c b/daemons/ipa-slapi-plugins/ipa-cldap/ipa_cldap_netlogon.c

Re: [Freeipa-devel] [PATCH 0133] ipa-cldap: Cut NetBIOS name after 15 characters

2013-12-11 Thread Martin Kosek
On 12/11/2013 12:56 PM, Alexander Bokovoy wrote: On Wed, 11 Dec 2013, Tomas Babej wrote: On 11/27/2013 03:38 PM, Simo Sorce wrote: On Wed, 2013-11-27 at 08:50 +0100, Tomas Babej wrote: Sorry to nitpick but ... diff --git a/daemons/ipa-slapi-plugins/ipa-cldap/ipa_cldap_netlogon.c

Re: [Freeipa-devel] [PATCH 0133] ipa-cldap: Cut NetBIOS name after 15 characters

2013-11-27 Thread Simo Sorce
On Wed, 2013-11-27 at 08:50 +0100, Tomas Babej wrote: Sorry to nitpick but ... 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

[Freeipa-devel] [PATCH 0133] ipa-cldap: Cut NetBIOS name after 15 characters

2013-11-26 Thread Tomas Babej
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 -- Tomas Babej Associate Software Engeneer | Red Hat | Identity Management RHCE | Brno Site |

Re: [Freeipa-devel] [PATCH 0133] ipa-cldap: Cut NetBIOS name after 15 characters

2013-11-26 Thread Jan Cholasta
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

Re: [Freeipa-devel] [PATCH 0133] ipa-cldap: Cut NetBIOS name after 15 characters

2013-11-26 Thread Simo Sorce
On Tue, 2013-11-26 at 16:38 +0100, Jan Cholasta wrote: 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.

Re: [Freeipa-devel] [PATCH 0133] ipa-cldap: Cut NetBIOS name after 15 characters

2013-11-26 Thread Jan Cholasta
On 26.11.2013 16:43, Simo Sorce wrote: On Tue, 2013-11-26 at 16:38 +0100, Jan Cholasta wrote: -pdc_name = talloc_asprintf(nlr, %s, fq_hostname); +snprintf(pdc_name, 16, %s, fq_hostname); +pdc_name[15] = '\0'; It's simpler to use length qualifiers in talloc_asprintf:

Re: [Freeipa-devel] [PATCH 0133] ipa-cldap: Cut NetBIOS name after 15 characters

2013-11-26 Thread Alexander Bokovoy
On Tue, 26 Nov 2013, Jan Cholasta wrote: On 26.11.2013 16:43, Simo Sorce wrote: On Tue, 2013-11-26 at 16:38 +0100, Jan Cholasta wrote: -pdc_name = talloc_asprintf(nlr, %s, fq_hostname); +snprintf(pdc_name, 16, %s, fq_hostname); +pdc_name[15] = '\0'; It's simpler to use

Re: [Freeipa-devel] [PATCH 0133] ipa-cldap: Cut NetBIOS name after 15 characters

2013-11-26 Thread Alexander Bokovoy
On Tue, 26 Nov 2013, 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 -- Tomas Babej Associate Software Engeneer | Red Hat

Re: [Freeipa-devel] [PATCH 0133] ipa-cldap: Cut NetBIOS name after 15 characters

2013-11-26 Thread Tomas Babej
On 11/26/2013 04:56 PM, Alexander Bokovoy wrote: On Tue, 26 Nov 2013, 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 --

Re: [Freeipa-devel] [PATCH 0133] ipa-cldap: Cut NetBIOS name after 15 characters

2013-11-26 Thread Alexander Bokovoy
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

Re: [Freeipa-devel] [PATCH 0133] ipa-cldap: Cut NetBIOS name after 15 characters

2013-11-26 Thread Tomas Babej
On 11/27/2013 08:25 AM, Alexander Bokovoy wrote: 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