Full_Name: Rein Tollevik Version: 2.4.8 OS: URL: ftp://ftp.openldap.org/incoming/ Submission from: (NULL) (84.215.2.34)
When the syncprov overlay is stacked on top of other overlays (notably the glue overlay) it must search through the next overlay, not the original backend DB. Otherwise it will not find any entries from the subordinate databases and consumers will remove those entries when they enters the refresh phase of the syncrepl protocol.
The attached patch fixes this problem.
Rein Tollevik Basefarm AS
Index: OpenLDAP/servers/slapd/overlays/syncprov.c diff -u OpenLDAP/servers/slapd/overlays/syncprov.c:1.6 OpenLDAP/servers/slapd/overlays/syncprov.c:1.7 --- OpenLDAP/servers/slapd/overlays/syncprov.c:1.6 Tue Mar 18 17:22:41 2008 +++ OpenLDAP/servers/slapd/overlays/syncprov.c Tue Mar 18 18:02:32 2008 @@ -696,7 +696,11 @@ break; }
- fop.o_bd->bd_info = on->on_info->oi_orig; + if ( on->on_next ) { + fop.o_bd->bd_info = (BackendInfo *) on->on_next; + } else { + fop.o_bd->bd_info = on->on_info->oi_orig; + } fop.o_bd->be_search( &fop, &frs ); fop.o_bd->bd_info = (BackendInfo *)on;
@@ -1522,7 +1526,11 @@ fop.ors_filter = ⁡
cb.sc_response = playlog_cb; - fop.o_bd->bd_info = on->on_info->oi_orig; + if (on->on_next) { + fop.o_bd->bd_info = (BackendInfo *) on->on_next; + } else { + fop.o_bd->bd_info = on->on_info->oi_orig; + }
for ( i=ndel; i<num; i++ ) { if ( uuids[i].bv_len == 0 ) continue;