]> git.sur5r.net Git - openldap/commitdiff
sync with the man page slapadd(8) : does not change syncrepl entries in the ldif...
authorJong Hyuk Choi <jongchoi@openldap.org>
Tue, 17 Feb 2004 23:56:18 +0000 (23:56 +0000)
committerJong Hyuk Choi <jongchoi@openldap.org>
Tue, 17 Feb 2004 23:56:18 +0000 (23:56 +0000)
servers/slapd/tools/slapadd.c

index 53ce29f483de429549262b337190de903da6c053..527399116ba282725371bc693bdcdb891fa67b76 100644 (file)
@@ -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 ) {