From c51748dc0fdeaacdf58a42dbe195035cd735fd97 Mon Sep 17 00:00:00 2001 From: German Parente Date: Mar 29 2019 19:17:29 +0000 Subject: Ticket #49946 upgrade of 389-ds-base could remove replication agreements. Bug Description: when a replication agreement starts with "cn=->...", the upgrade is removing the entry. Fix Description: a check is missing when re-building dse.ldif in "setup-ds.pl -u" that provoked this entry not to be re-added to the file. https://pagure.io/389-ds-base/issue/49946 Author: German Parente Review by: ??? --- diff --git a/ldap/admin/src/scripts/FileConn.pm b/ldap/admin/src/scripts/FileConn.pm index dcea709..8a2a1af 100644 --- a/ldap/admin/src/scripts/FileConn.pm +++ b/ldap/admin/src/scripts/FileConn.pm @@ -360,7 +360,7 @@ sub add { return $self->write(); } - if (exists($self->{$ndn})) { + if ($ndn && exists($self->{$ndn})) { $self->setErrorCode(LDAP_ALREADY_EXISTS); return 0; }