Full_Name: Hallvard B Furuseth Version: HEAD OS: Linux URL: ftp://ftp.openldap.org/incoming/ Submission from: (NULL) (129.240.203.232) Submitted by: hallvard
back-config crashes if I delete some attribute, even some which does not exist, and then olcAttributeOptions:
bash$ cat slapd.conf include servers/slapd/schema/core.schema database config rootdn cn=config rootpw secret
bash$ ldapmodify -xh:3890 -Dcn=config -wsecret dn: cn=config changetype: modify # or use "delete: o" delete: olcAllows - delete: olcAttributeOptions olcAttributeOptions: foo -
Crash in bconfig.c:config_modify_internal line 4843 because d == NULL: 4842 if ( ml->sml_values ) { 4843 d = d->next; 4844 ch_free( dels ); 4845 dels = d; 4846 }
Backtrace: #0 0x000000000042db19 in config_modify_internal (ce=0x9cb710, op=0x9d7330, rs=0x41801cb0, ca=0x417ff750) at bconfig.c:4843 #1 0x000000000042e34a in config_back_modify (op=0x9d7330, rs=0x41801cb0) at bconfig.c:4991 #2 0x0000000000461107 in fe_op_modify (op=0x9d7330, rs=0x41801cb0) at modify.c:300 #3 0x00000000004609b0 in do_modify (op=0x9d7330, rs=0x41801cb0) at modify.c:175 #4 0x0000000000440dd8 in connection_operation (ctx=0x41801e00, arg_v=0x9d7330) at connection.c:1087 #5 0x0000000000441306 in connection_read_thread (ctx=0x41801e00, argv=0x9) at connection.c:1214 #6 0x00002b100d4c354f in ldap_int_thread_pool_wrapper (xpool=0x927a10) at tpool.c:625 #7 0x00002b100e1e6317 in start_thread () from /lib/libpthread.so.0 #8 0x00002b100f935d5d in clone () from /lib/libc.so.6 #9 0x0000000000000000 in ?? ()
Also the error message from deleting just olcAttributeOptions is bad:
bash$ ldapmodify -xh:3890 -Dcn=config -wsecret dn: cn=config changetype: modify replace: olcAttributeOptions olcAttributeOptions: foo
ldap_modify: Internal (implementation specific) error (80) additional info: modify/delete: modifyTimestamp: no such attribute modifying entry "cn=config"
Finally "replace:" only needs to fail if there are options to delete, not if one adds a line with just "attributeOptions" to slapd.conf. That removes the default, "lang-".