From: Howard Chu Date: Thu, 6 Nov 2008 21:10:25 +0000 (+0000) Subject: ITS#5710 fix stupid updateCookie hack, use explicit o_dont_replicate flag X-Git-Tag: ACLCHECK_0~1146 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5dc58028c149a9e8186122ccd2ec8d8df5f1fb9d;p=openldap ITS#5710 fix stupid updateCookie hack, use explicit o_dont_replicate flag --- diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index ab0ef885a8..835ed240d7 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -1648,8 +1648,7 @@ syncprov_op_response( Operation *op, SlapReply *rs ) } /* Don't do any processing for consumer contextCSN updates */ - if ( SLAP_SYNC_SHADOW( op->o_bd ) && - op->o_msgid == SLAP_SYNC_UPDATE_MSGID ) { + if ( op->o_dont_replicate ) { ldap_pvt_thread_rdwr_wunlock( &si->si_csn_rwlock ); return SLAP_CB_CONTINUE; } diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index fa72448dea..cfe52274e2 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -1694,8 +1694,6 @@ struct syncinfo_s; #define SLAP_SYNC_SID_MAX 4095 /* based on liblutil/csn.c field width */ #define SLAP_SYNCUUID_SET_SIZE 256 -#define SLAP_SYNC_UPDATE_MSGID 1 - struct sync_cookie { struct berval *ctxcsn; struct berval octet_str; @@ -2594,6 +2592,7 @@ struct Operation { GroupAssertion *o_groups; char o_do_not_cache; /* don't cache groups from this op */ char o_is_auth_check; /* authorization in progress */ + char o_dont_replicate; slap_access_t o_acl_priv; char o_nocaching; diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index dd39e3cea4..199c882c93 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -2809,13 +2809,13 @@ syncrepl_updateCookie( op->o_req_ndn = op->o_bd->be_nsuffix[0]; /* update contextCSN */ - op->o_msgid = SLAP_SYNC_UPDATE_MSGID; + op->o_dont_replicate = 1; op->orm_modlist = &mod; op->orm_no_opattrs = 1; rc = op->o_bd->be_modify( op, &rs_modify ); op->orm_no_opattrs = 0; - op->o_msgid = 0; + op->o_dont_replicate = 0; if ( rs_modify.sr_err == LDAP_SUCCESS ) { slap_sync_cookie_free( &si->si_syncCookie, 0 );