[Date Prev][Date Next]
Re: ldapadd with undefined objectclass causes assertion failure (ITS#3097)
At 09:52 AM 4/19/2004, email@example.com wrote:
>> Full_Name: Ralf Haferkamp
>> Version: 2.2.10 (HEAD)
>> OS: Linux
>> URL: ftp://ftp.openldap.org/incoming/
>> Submission from: (NULL) (184.108.40.206)
>> When trying to add an entry with an undefined objectclass I get:
>> slapd: result.c:556: slap_send_ldap_result: Assertion
>> `!((rs->sr_err)<0)' failed
>> Example entry:
>> dn: dc=my-domain,dc=com
>> objectclass: dcobject
>> objectclass: undefined
>> dc: my-domain
>> If I see it correctly this bug was introduced with the fix for ITS#3066.
>> value_match() called from server/slapd/modify.c (slap_mods_check()) line
>> #799 calls objectSubClassMatch() which then returns
>> SLAPD_COMPARE_UNDEFINED (-1) because of the undefined objectclass
>I think this assertion was introduced in order to trap (negative) client
>API errors being erroneously returned instead of protocol errors.
Yes (slapd internal codes are also negative).
>SLAPD_COMPARE_UNDEFINED should take a positive value instead.
No. The code needs to map this internal code to an appropriate
protocol result code.