[Kolab-devel] LDAP3.php mod to allow multimaster

Manel Gimeno Zaragozá <[email protected]>
Newsgroups gmane.comp.kde.devel.kolab
Message-ID <DUB119-W110578C4D7229105CE4F71DDF10__36882.7365492054$1383671814$gmane$org@phx.gbl>
Hello,

I've try to configure 4 multimaster LDAP servers in a hosted domain environment and I've noticed with LDAP3.php function add_replication_agreements the replication agreements where not correctly configured to setup more than 1 server. The problem looks like to be in the following lines:

$ diff -u /usr/share/kolab-webadmin/lib/ext/Net/LDAP3.php.old /usr/share/kolab-webadmin/lib/ext/Net/LDAP3.php
--- /usr/share/kolab-webadmin/lib/ext/Net/LDAP3.php.old 2013-11-05 18:01:45.754115852 +0100
+++ /usr/share/kolab-webadmin/lib/ext/Net/LDAP3.php     2013-11-05 17:58:02.824115622 +0100
@@ -342,13 +342,14 @@
                         'nsDS5ReplicaCredentials',
                         'nsDS5ReplicaTransportInfo',
                         'nsDS5ReplicaBindMethod',
-                        'nsDS5ReplicaHost',
+                        //'nsDS5ReplicaHost',
                         'nsDS5ReplicaPort'
                     );

                 $replica_agreement_attrs = $ldap->get_entry_attributes($replica_agreement_tpl_dn, $attrs);
                 $replica_agreement_attrs['cn'] = array_shift(explode('.', $replicate_to_host)) . str_replace(array('dc=',','), array('_',''), $domain_root_dn);
                 $replica_agreement_attrs['nsDS5ReplicaRoot'] = $domain_root_dn;
+                $replica_agreement_attrs['nsDS5ReplicaHost'] = $replicate_to_host;
                 $replica_agreement_dn = "cn=" . $replica_agreement_attrs['cn'] . "," . $new_replica_dn;

                 $this->_debug("Adding $replica_agreement_dn to $replica_host with attributes: " . var_export($replica_agreement_attrs, TRUE));

The attribute nsDS5ReplicaHost it is defined with no value and If it is defined with "$replicate_to_host" the code configure correctly more than 1 server to replicate.

Can someone validate this modification? am I assuming something wrong?

Regards. 

Manel

_______________________________________________
devel mailing list
[email protected]
https://lists.kolab.org/mailman/listinfo/devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.