[Date Prev][Date Next] [Chronological] [Thread] [Top]

Small patch to slapd/backend.c



Hi,

OpenLDAP 2.0 allowed backend_attribute() to be called without be being
set. The slapd "glue" code broke this is 2.1. The following small patch
fixes the problem.

--------------------------------------------------------------------------
diff -u -r1.150 backend.c
--- servers/slapd/backend.c     2002/02/12 03:50:40     1.150
+++ servers/slapd/backend.c     2002/03/18 06:36:11
@@ -1054,11 +1055,12 @@
        BerVarray *vals
 )
 {
+       int glueflags = ( be ? (be->be_glueflags & SLAP_BFLAG_GLUE_INSTANCE) : 0 );
+               
        if ( target == NULL || !dn_match( &target->e_nname, edn ) ) {
                /* we won't attempt to send it to a different backend */
                
-               be = select_backend( edn, 0,
-                       (be->be_flags & SLAP_BFLAG_GLUE_INSTANCE));
+               be = select_backend( edn, 0, glueflags );   
 
                if (be == NULL) {
                        return LDAP_NO_SUCH_OBJECT;
------------------------------------------------------------------------------

Ganesan