]> git.sur5r.net Git - openldap/commitdiff
ITS#4027 select_backend should ignore manageDSAit when glue is in use.
authorHoward Chu <hyc@openldap.org>
Mon, 3 Oct 2005 03:12:32 +0000 (03:12 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 3 Oct 2005 03:12:32 +0000 (03:12 +0000)
servers/slapd/backend.c

index f6f868a30d52d0b061e65f49992eb8b010aba4c6..77dcf4a422b7eb562738fb6e564b50a26b8820da 100644 (file)
@@ -614,7 +614,13 @@ select_backend(
                                                continue;
                                        }
                                } else {
-                                       b2 = be;
+                                       /* If any parts of the tree are glued, use the first
+                                        * match regardless of manageDSAit. Otherwise use the
+                                        * last match.
+                                        */
+                                       if( !( SLAP_DBFLAGS( be ) & ( SLAP_DBFLAG_GLUE_INSTANCE |
+                                               SLAP_DBFLAG_GLUE_SUBORDINATE )))
+                                               b2 = be;
                                }
                                return b2;
                        }