Browse Source

Ticket 48266 - Online init crashes consumer

Bug Description:  When trying to create the 'replica keep alive' entry
                  on a consumer during an online init, the entry gets freed
                  in op_shared_add(), and then freed again in
                  replica_subentry_create() which leads to a crash.

Fix Description:  Do not free the "keep alive" entry if a referral is
                  returned when trying to create the keep-alive entry.

https://fedorahosted.org/389/ticket/48266

Reviewed by: tbordaz(Thanks!)
Mark Reynolds 10 years ago
parent
commit
5538bac519
1 changed files with 3 additions and 1 deletions
  1. 3 1
      ldap/servers/plugins/replication/repl5_replica.c

+ 3 - 1
ldap/servers/plugins/replication/repl5_replica.c

@@ -448,7 +448,9 @@ replica_subentry_create(Slapi_DN *repl_root, ReplicaId rid)
             repl_get_plugin_identity(PLUGIN_MULTIMASTER_REPLICATION), 0 /* flags */);
     slapi_add_internal_pb(pb);
     slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &return_value);
-    if (return_value != LDAP_SUCCESS && return_value != LDAP_ALREADY_EXISTS) 
+    if (return_value != LDAP_SUCCESS &&
+        return_value != LDAP_ALREADY_EXISTS &&
+        return_value != LDAP_REFERRAL /* CONSUMER */)
     {
         slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "Warning: unable to "
                 "create replication keep alive entry %s: %s\n", slapi_entry_get_dn_const(e),