Full_Name: Rein Tollevik Version: 2.4.8 OS: URL: ftp://ftp.openldap.org/incoming/ Submission from: (NULL) (84.215.2.34)
syncrepl_updateCookie() writes the contextCSN to the suffix of si->si_wbe (assigned to op->o_bd). In a subordinate database this is the parent DB, it should be written to the suffix of si->si_be instead as the attached patch fixes.
I first considered writing it directly to si->si_be rather than through si->si_wbe, but I'm not familiar enough with the syncrepl/syncprov code to tell whether that would be correct or not.
Rein Tollevik Basefarm AS
Index: OpenLDAP/servers/slapd/syncrepl.c diff -u OpenLDAP/servers/slapd/syncrepl.c:1.5 OpenLDAP/servers/slapd/syncrepl.c:1.6 --- OpenLDAP/servers/slapd/syncrepl.c:1.5 Mon Mar 3 14:04:54 2008 +++ OpenLDAP/servers/slapd/syncrepl.c Fri Mar 14 16:27:41 2008 @@ -2683,8 +2683,8 @@ cb.sc_private = si;
op->o_callback = &cb; - op->o_req_dn = op->o_bd->be_suffix[0]; - op->o_req_ndn = op->o_bd->be_nsuffix[0]; + op->o_req_dn = si->si_be->be_suffix[0]; + op->o_req_ndn = si->si_be->be_nsuffix[0];
/* update contextCSN */ op->o_msgid = SLAP_SYNC_UPDATE_MSGID;