mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-30 13:30:57 +08:00
ITS#5710 fix stupid updateCookie hack, use explicit o_dont_replicate flag
This commit is contained in:
parent
bda294f5c1
commit
5dc58028c1
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user