From: Jong Hyuk Choi Date: Tue, 17 Feb 2004 23:56:18 +0000 (+0000) Subject: sync with the man page slapadd(8) : does not change syncrepl entries in the ldif... X-Git-Tag: OPENLDAP_REL_ENG_2_2_BP~423 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=528ea2f808af3fbea0a0f12cb5c61f0c78632afb;p=openldap sync with the man page slapadd(8) : does not change syncrepl entries in the ldif file when neither of the promotion (-p) or the demotion (-r) option is given. --- diff --git a/servers/slapd/tools/slapadd.c b/servers/slapd/tools/slapadd.c index 53ce29f483..527399116b 100644 --- a/servers/slapd/tools/slapadd.c +++ b/servers/slapd/tools/slapadd.c @@ -305,7 +305,8 @@ main( int argc, char **argv ) } } - if ( update_ctxcsn == SLAP_TOOL_CTXCSN_KEEP ) { + if ( update_ctxcsn == SLAP_TOOL_CTXCSN_KEEP && + ( replica_promotion || replica_demotion )) { if ( is_entry_syncProviderSubentry( e )) { if ( !LDAP_SLIST_EMPTY( &consumer_subentry )) { fprintf( stderr, "%s: consumer and provider subentries " @@ -399,8 +400,9 @@ main( int argc, char **argv ) } } - if ( !is_entry_syncProviderSubentry( e ) && - !is_entry_syncConsumerSubentry( e )) { + if (( !is_entry_syncProviderSubentry( e ) && + !is_entry_syncConsumerSubentry( e )) || + ( !replica_promotion && !replica_demotion )) { if (!dryrun) { ID id = be->be_entry_put( be, e, &bvtext ); if( id == NOID ) {