[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#7780) constraint_attribute <attr> <size|count> 0 cause segfault



hyc@symas.com wrote:
> ondra@mistotebe.net wrote:
>> On Wed, Dec 17, 2014 at 03:33:32PM +0000, hyc@symas.com wrote:
>>> Hello Ondrej,
>>>     I tried your patch but it breaks test064-constraint.
>>
>> Hi Howard,
>> there is useless code that caused it to read an unitialized variable. A
>> fix removing that code is at
>> ftp://ftp.openldap.org/incoming/Ondrej-Kuznik-20141218-ITS-7781.patch
>>
>> Thanks for identifying and fixing the problem in the meantime.
>>
> Ok. But looking at this patch, the lines in question actually are 
> needed, since they take care of errors in the cases for CONSTRAINT_COUNT 
> and CONSTRAINT_SET.

Just because I'm curious:

What's the use-case for setting size and count to zero?

If one wants to forbid an attribute completely one should probably use NOT in
a DIT content rule for the STRUCTURAL object class.
(This does not mean that this shouldn't be fixed though.)

Just my 2 cents.

Ciao, Michael.