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

Re: RE : cvs HEAD, dumb filter (cn=) crashes slapd



value_normalize() should be calling the validator before
calling the normalizer.

At 07:51 AM 2002-03-01, Pierangelo Masarati wrote:
>Pierangelo Masarati wrote:
>> 
>> John Hughes wrote:
>> >
>> > >> Just doing a ldapsearch (cn=) crashes slapd,
>> > >>
>> > >> schema_init.c:542: failed assertion `normalized->bv_val'
>> >
>> > >I'll check that later; can you tell me what client/library
>> > >version did you use?
>> >
>> > 2.0.18-Release
>> >
>> > Same results with 2.X (as of today) and perl-ldap-0.25.
>> 
>> I asked because I knew "cn=" was handled correctly by the
>> ldap_str2[r]dn routines at some stage of their development,
>> so I suspected a (mis)use not expected or so.  I'll check
>> it in a moment, but I'm about to leave for the weekend, so
>> I'm not sure I'llbe able to fix it tonight.
>
>This is what I got:
>
>Program received signal SIGABRT, Aborted.
>0x400f9c71 in __kill () from /lib/libc.so.6
>(gdb) bt
>#0  0x400f9c71 in __kill () from /lib/libc.so.6
>#1  0x400d01b7 in raise (sig=6) at signals.c:65
>#2  0x400faff8 in abort () at ../sysdeps/generic/abort.c:88
>#3  0x400f3b2e in __assert_fail () at assert.c:59
>#4  0x806abe2 in UTF8StringNormalize (syntax=0x816ed00, val=0xbf5ffc64, 
>    normalized=0x81ab66c) at schema_init.c:542
>#5  0x805f279 in value_normalize (ad=0x81a04f0, usage=256,
>in=0xbf5ffc64, 
>    out=0x81ab66c, text=0xbf5ffd14) at value.c:109
>#6  0x805f5c0 in get_ava (ber=0x81ab5f8, ava=0x81ab65c, usage=256, 
>    text=0xbf5ffd14) at ava.c:66
>#7  0x8050b8c in get_filter (conn=0x40258da4, ber=0x81ab5f8,
>filt=0xbf5ffd08, 
>    fstr=0xbf5ffd0c, text=0xbf5ffd14) at filter.c:111
>#8  0x80504a9 in do_search (conn=0x40258da4, op=0x81ab518) at
>search.c:139
>#9  0x804f629 in connection_operation (arg_v=0x81ab598) at
>connection.c:964
>#10 0x80aa748 in ldap_int_thread_pool_wrapper (pool=0x816d620) at
>tpool.c:402
>#11 0x400cdb25 in pthread_start_thread (arg=0xbf5ffe40) at manager.c:241
>
>This means get_ava() asks value_normalize() to normalize 
>an empty value; this results in allocating a null-valued
>normalized value struct berval.  There are two solutions 
>to this problem: allow empty strings as values (which means
>handling the 0 length berval in value_normalize()) or 
>stop them before calling the normalization function.
>I don't have time to dig out what's the more appropriate
>behavior from the appropriate RFC's so if there's any 
>suggestion, I can fix the problem in a moment.
>
>Thanks for cooperating, 
>
>Pierangelo.
>
>> 
>> --
>> Dr. Pierangelo Masarati               | voice: +39 02 2399 8309
>> Dip. Ing. Aerospaziale                | fax:   +39 02 2399 8334
>> Politecnico di Milano                 |
>> mailto:pierangelo.masarati@polimi.it
>> via La Masa 34, 20156 Milano, Italy   |
>> http://www.aero.polimi.it/~masarati
>
>-- 
>Dr. Pierangelo Masarati               | voice: +39 02 2399 8309
>Dip. Ing. Aerospaziale                | fax:   +39 02 2399 8334
>Politecnico di Milano                 |
>mailto:pierangelo.masarati@polimi.it
>via La Masa 34, 20156 Milano, Italy   |
>http://www.aero.polimi.it/~masarati