[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
segfault in slapd (schema_init.c)
Hi all!
I've set up OpenLDAP 2.0.25 and added few custom attributes and
objectclasses
they're veeeery simple
upuser which allows upoption
upoption is just an octet string (to allow zero length string)
------ example ------
upoption:
upoption: personal/mail/encoding=koi8-r
upoption: system/host=ukrpost.net
...more upoptions here....
------------------
when I try to modify this entry slapd segfaults.
"gdb slapd core" shows this:
#0 0xff132f4c in strncmp () from /usr/lib/libc.so.1
#1 0x3f670 in caseExactMatch (matchp=0xfeaffb0c, flags=1,
syntax=0x107df0, mr=0x1097c0, value=0x1d25a8,
assertedValue=0x1c4100) at schema_init.c:649
#2 0x34954 in value_match (match=0xfeaffb0c, ad=0x1c4150, mr=0x1097c0,
flags=1, v1=0x1d25a8, v2=0x1c4100,
text=0xfeaffb10) at value.c:147
#3 0x49148 in delete_values (e=0x10dcc0, mod=0x1c4240, dn=0x10dc20
"CN=MANAGER,O=UKRPOST") at modify.c:386
#4 0x487c0 in ldbm_modify_internal (be=0x129f28, conn=0xe2f70,
op=0x1c1738,
dn=0xe2c00 " no objectClass attribute\n", modlist=0x1c4240,
e=0x10dcc0, text=0xfeaffc08,
textbuf=0xfeaffc10 "", textlen=256) at modify.c:73
#5 0x48db8 in ldbm_back_modify (be=0x129f28, conn=0x1aeca0, op=0x1c1738,
dn=0x10f2a0 "uid=proboez,ou=People,o=ukrpost.net,o=ukrpost",
ndn=0x1c1910 "UID=PROBOEZ,OU=PEOPLE,O=UKRPOST.NET,O=UKRPOST",
modlist=0x1c4030) at modify.c:240
#6 0x33094 in do_modify (conn=0x1aeca0, op=0x1c1738) at modify.c:268
#7 0x25c04 in connection_operation (arg_v=0x1d54f0) at connection.c:823
#8 0x5f19c in ldap_int_thread_pool_wrapper (pool=0x1072a0) at tpool.c:379
the error i guess is here:
from schema_init.c:
> 649 match = strncmp( value->bv_val,
> 650 ((struct berval *)
assertedValue)->bv_val,
> 651 value->bv_len );
> (gdb) print ((struct berval *) assertedValue)->bv_val
> $1 = 0x0
-----------------
previously i have fixed this:
near schema_init.c:572 in UTF8StringNormalize
#ifdef MY_FIX_HERE
if (!val->bv_val)
return LDAP_SUCCESS;
#endif
newval = ch_malloc( sizeof( struct berval ) );
p = val->bv_val;
--------------------
other details:
my systems are sparc-sun-solaris2.[89]
from local.schema:
attributetype ( 1.3.6.1.4.1.7915.1.2.1.3 NAME 'upoption'
DESC 'upoption'
EQUALITY caseExactMatch
SUBSTR caseExactSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 )