Issue 8105 - [PATCH] slaptest doesn't convert perlModuleConfig lines
Summary: [PATCH] slaptest doesn't convert perlModuleConfig lines
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-15 07:36 UTC by jsynacek@redhat.com
Modified: 2015-07-02 17:50 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description jsynacek@redhat.com 2015-04-15 07:36:52 UTC
Full_Name: Jan Synacek
Version: master
OS: GNU/Linux
URL: https://jsynacek.fedorapeople.org/openldap/jsynacek-20150415-back-perl-correctly-convert-perlModuleConfig.patch
Submission from: (NULL) (213.175.37.10)


When using the perl backend, slaptest doesn't convert perlModuleConfig lines
from slapd.conf to slapd.d.

A simple reproducer can be found at
https://jsynacek.fedorapeople.org/openldap/back-perl.sh
Comment 1 Howard Chu 2015-04-16 01:56:12 UTC
jsynacek@redhat.com wrote:
> Full_Name: Jan Synacek
> Version: master
> OS: GNU/Linux
> URL: https://jsynacek.fedorapeople.org/openldap/jsynacek-20150415-back-perl-correctly-convert-perlModuleConfig.patch
> Submission from: (NULL) (213.175.37.10)
>
>
> When using the perl backend, slaptest doesn't convert perlModuleConfig lines
> from slapd.conf to slapd.d.
>
> A simple reproducer can be found at
> https://jsynacek.fedorapeople.org/openldap/back-perl.sh
>
>
Thanks, added to git master

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 2 Howard Chu 2015-04-16 01:57:06 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 3 Quanah Gibson-Mount 2015-04-16 20:12:25 UTC
changed notes
changed state Test to Release
Comment 4 jsynacek@redhat.com 2015-04-24 11:53:36 UTC
Howard Chu <hyc@symas.com> writes:

> jsynacek@redhat.com wrote:
>> Full_Name: Jan Synacek
>> Version: master
>> OS: GNU/Linux
>> URL: https://jsynacek.fedorapeople.org/openldap/jsynacek-20150415-back-perl-correctly-convert-perlModuleConfig.patch
>> Submission from: (NULL) (213.175.37.10)
>>
>>
>> When using the perl backend, slaptest doesn't convert perlModuleConfig lines
>> from slapd.conf to slapd.d.
>>
>> A simple reproducer can be found at
>> https://jsynacek.fedorapeople.org/openldap/back-perl.sh
>>
>>
> Thanks, added to git master

I misunderstood the semantics of perlModuleConfig when given multiple
arguments, so the patch isn't quite correct. I'm sorry for the
confusion. The fix can be found at:

URL: https://jsynacek.fedorapeople.org/openldap/jsynacek-20150424-More-for-ITS-8105.patch

Please note that I'm not aware of any internal functions that I can use
to flatten a list of strings. If there are some, or if there is a better
way to fix the issue, please advice, I'll simplify the patch.

-- 
Jan Synacek
Software Engineer, Red Hat
Comment 5 Howard Chu 2015-04-24 20:31:31 UTC
Jan Synacek wrote:
> Howard Chu <hyc@symas.com> writes:
>
>> jsynacek@redhat.com wrote:
>>> Full_Name: Jan Synacek
>>> Version: master
>>> OS: GNU/Linux
>>> URL: https://jsynacek.fedorapeople.org/openldap/jsynacek-20150415-back-perl-correctly-convert-perlModuleConfig.patch
>>> Submission from: (NULL) (213.175.37.10)
>>>
>>>
>>> When using the perl backend, slaptest doesn't convert perlModuleConfig lines
>>> from slapd.conf to slapd.d.
>>>
>>> A simple reproducer can be found at
>>> https://jsynacek.fedorapeople.org/openldap/back-perl.sh
>>>
>>>
>> Thanks, added to git master
>
> I misunderstood the semantics of perlModuleConfig when given multiple
> arguments, so the patch isn't quite correct. I'm sorry for the
> confusion. The fix can be found at:
>
> URL: https://jsynacek.fedorapeople.org/openldap/jsynacek-20150424-More-for-ITS-8105.patch
>
> Please note that I'm not aware of any internal functions that I can use
> to flatten a list of strings. If there are some, or if there is a better
> way to fix the issue, please advice, I'll simplify the patch.
>
Hi Jan, there's no need to muck with the list of strings, just use 
c->line instead of c->argv.

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 6 jsynacek@redhat.com 2015-04-27 07:24:32 UTC
Howard Chu <hyc@symas.com> writes:

> Jan Synacek wrote:
>> Howard Chu <hyc@symas.com> writes:
>>
>>> jsynacek@redhat.com wrote:
>>>> Full_Name: Jan Synacek
>>>> Version: master
>>>> OS: GNU/Linux
>>>> URL: https://jsynacek.fedorapeople.org/openldap/jsynacek-20150415-back-perl-correctly-convert-perlModuleConfig.patch
>>>> Submission from: (NULL) (213.175.37.10)
>>>>
>>>>
>>>> When using the perl backend, slaptest doesn't convert perlModuleConfig lines
>>>> from slapd.conf to slapd.d.
>>>>
>>>> A simple reproducer can be found at
>>>> https://jsynacek.fedorapeople.org/openldap/back-perl.sh
>>>>
>>>>
>>> Thanks, added to git master
>>
>> I misunderstood the semantics of perlModuleConfig when given multiple
>> arguments, so the patch isn't quite correct. I'm sorry for the
>> confusion. The fix can be found at:
>>
>> URL: https://jsynacek.fedorapeople.org/openldap/jsynacek-20150424-More-for-ITS-8105.patch
>>
>> Please note that I'm not aware of any internal functions that I can use
>> to flatten a list of strings. If there are some, or if there is a better
>> way to fix the issue, please advice, I'll simplify the patch.
>>
> Hi Jan, there's no need to muck with the list of strings, just use 
> c->line instead of c->argv.

Thank you for your advice! I've simplified the patch (url stays the same).

Cheers,
-- 
Jan Synacek
Software Engineer, Red Hat

Comment 7 Howard Chu 2015-04-27 09:36:05 UTC
Jan Synacek wrote:
> Howard Chu <hyc@symas.com> writes:
>
>> Jan Synacek wrote:
>>> Howard Chu <hyc@symas.com> writes:
>>>
>>>> jsynacek@redhat.com wrote:
>>>>> Full_Name: Jan Synacek
>>>>> Version: master
>>>>> OS: GNU/Linux
>>>>> URL: https://jsynacek.fedorapeople.org/openldap/jsynacek-20150415-back-perl-correctly-convert-perlModuleConfig.patch
>>>>> Submission from: (NULL) (213.175.37.10)
>>>>>
>>>>>
>>>>> When using the perl backend, slaptest doesn't convert perlModuleConfig lines
>>>>> from slapd.conf to slapd.d.
>>>>>
>>>>> A simple reproducer can be found at
>>>>> https://jsynacek.fedorapeople.org/openldap/back-perl.sh
>>>>>
>>>>>
>>>> Thanks, added to git master
>>>
>>> I misunderstood the semantics of perlModuleConfig when given multiple
>>> arguments, so the patch isn't quite correct. I'm sorry for the
>>> confusion. The fix can be found at:
>>>
>>> URL: https://jsynacek.fedorapeople.org/openldap/jsynacek-20150424-More-for-ITS-8105.patch
>>>
>>> Please note that I'm not aware of any internal functions that I can use
>>> to flatten a list of strings. If there are some, or if there is a better
>>> way to fix the issue, please advice, I'll simplify the patch.
>>>
>> Hi Jan, there's no need to muck with the list of strings, just use
>> c->line instead of c->argv.
>
> Thank you for your advice! I've simplified the patch (url stays the same).

Looks OK. One minor nit - we discourage using strlen() (or most of the 
libc str* functions, really). We particularly discourage runtime 
calculations on compile-time constants (including string constants) - 
use the STRLENOF() macro instead.

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 8 jsynacek@redhat.com 2015-04-27 10:13:32 UTC
Howard Chu <hyc@symas.com> writes:

> Jan Synacek wrote:
>> Howard Chu <hyc@symas.com> writes:
>>
>>> Jan Synacek wrote:
>>>> Howard Chu <hyc@symas.com> writes:
>>>>
>>>>> jsynacek@redhat.com wrote:
>>>>>> Full_Name: Jan Synacek
>>>>>> Version: master
>>>>>> OS: GNU/Linux
>>>>>> URL: https://jsynacek.fedorapeople.org/openldap/jsynacek-20150415-back-perl-correctly-convert-perlModuleConfig.patch
>>>>>> Submission from: (NULL) (213.175.37.10)
>>>>>>
>>>>>>
>>>>>> When using the perl backend, slaptest doesn't convert perlModuleConfig lines
>>>>>> from slapd.conf to slapd.d.
>>>>>>
>>>>>> A simple reproducer can be found at
>>>>>> https://jsynacek.fedorapeople.org/openldap/back-perl.sh
>>>>>>
>>>>>>
>>>>> Thanks, added to git master
>>>>
>>>> I misunderstood the semantics of perlModuleConfig when given multiple
>>>> arguments, so the patch isn't quite correct. I'm sorry for the
>>>> confusion. The fix can be found at:
>>>>
>>>> URL: https://jsynacek.fedorapeople.org/openldap/jsynacek-20150424-More-for-ITS-8105.patch
>>>>
>>>> Please note that I'm not aware of any internal functions that I can use
>>>> to flatten a list of strings. If there are some, or if there is a better
>>>> way to fix the issue, please advice, I'll simplify the patch.
>>>>
>>> Hi Jan, there's no need to muck with the list of strings, just use
>>> c->line instead of c->argv.
>>
>> Thank you for your advice! I've simplified the patch (url stays the same).
>
> Looks OK. One minor nit - we discourage using strlen() (or most of the 
> libc str* functions, really). We particularly discourage runtime 
> calculations on compile-time constants (including string constants) - 
> use the STRLENOF() macro instead.

Done.

-- 
Jan Synacek
Software Engineer, Red Hat
Comment 9 Howard Chu 2015-04-27 10:23:48 UTC
Jan Synacek wrote:
> Howard Chu <hyc@symas.com> writes:

>> Looks OK. One minor nit - we discourage using strlen() (or most of the
>> libc str* functions, really). We particularly discourage runtime
>> calculations on compile-time constants (including string constants) -
>> use the STRLENOF() macro instead.
>
> Done.
>
Thanks, in git master.

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 10 Howard Chu 2015-04-27 10:24:35 UTC
changed notes
changed state Release to Test
Comment 11 Quanah Gibson-Mount 2015-06-18 21:27:34 UTC
changed notes
changed state Test to Release
Comment 12 OpenLDAP project 2015-07-02 17:50:26 UTC
fixed in master
fixed in RE25
fixed in RE24
Comment 13 Quanah Gibson-Mount 2015-07-02 17:50:26 UTC
changed notes
changed state Release to Closed