[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: (ITS#5343) cn=config crash when deleting attrs
On Mittwoch, 30. Januar 2008, h.b.furuseth@usit.uio.no wrote:
[..]
>
> 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 }
[..]
This should be fixed in HEAD now. The code did not check the return code
of modify_delete_vindex() for failures.
> 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-".
Haven't looked into this yet.
--
Ralf