[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openldap-devel
Subject:    Re: commit: ldap/servers/slapd/back-bdb filterindex.c
From:       Howard Chu <hyc () symas ! com>
Date:       2007-07-09 21:45:02
Message-ID: 4692AC5E.2060905 () symas ! com
[Download RAW message or body]

quanah@OpenLDAP.org wrote:
> Update of /repo/OpenLDAP/pkg/ldap/servers/slapd/back-bdb
> 
> Modified Files:
> 	filterindex.c  1.68 -> 1.69
> 
> Log Message:
> ITS#5037
> Move db == NULL check to correct spot

As we already discussed in IM, just re-ordering the tests is not sufficient. 
The actual test for db == NULL is wrong, you have to test the rc for the 
specific value (LDAP_INAPPROPRIATE_MATCHING). There are two problems - if 
bdb_index_param fails for any reason at all, it will not set the db, so you 
need to distinguish the serious failures from the benign ones. Also, if you 
examine the code for bdb_index_param, you'll see that it never touches the db 
parameter on failure, so it will remain uninitialized.
-- 
   -- Howard Chu
   Chief Architect, Symas Corp.  http://www.symas.com
   Director, Highland Sun        http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP     http://www.openldap.org/project/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic