From 6bedb611cd4703dfe4a8466c218cebfbca62090a Mon Sep 17 00:00:00 2001
From: Oliver Liebel <oliver@itc.li>
Date: Sat, 13 Mar 2010 23:22:53 +0100
Subject: [PATCH] Fixed MMR-URL-Split and changed RIDs to 3 Digits (OpenLDAP ITS#6394)

---
 source4/scripting/python/samba/provisionbackend.py |   15 ++++++++-------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/source4/scripting/python/samba/provisionbackend.py b/source4/scripting/python/samba/provisionbackend.py
index 1919c5d..ed113e1 100644
--- a/source4/scripting/python/samba/provisionbackend.py
+++ b/source4/scripting/python/samba/provisionbackend.py
@@ -358,13 +358,14 @@ class OpenLDAPBackend(LDAPBackend):
         
             url_list=filter(None,self.ol_mmr_urls.split(' ')) 
             if (len(url_list) == 1):
-                url_list=filter(None,self.ol_mmr_urls.split(',')) 
+                raise ProvisioningError("At least 2 LDAP-URLs needed for MMR!")
+                # raise error if only 1 ol-mmr-url was commited during provision
+ 
             
-                mmr_on_config = "MirrorMode On"
-                mmr_replicator_acl = "  by dn=cn=replicator,cn=samba read"
-                serverid=0
-                for url in url_list:
+            mmr_on_config = "MirrorMode On"
+            mmr_replicator_acl = "  by dn=cn=replicator,cn=samba read"
+            serverid=0
+            for url in url_list:
                     serverid=serverid+1
                     mmr_serverids_config += read_and_sub_file(self.setup_path("mmr_serverids.conf"),
                                                           { "SERVERID" : str(serverid),
@@ -400,7 +401,7 @@ class OpenLDAPBackend(LDAPBackend):
             olc_serverids_config = ""
             olc_syncrepl_seed_config = ""
             olc_mmr_config += read_and_sub_file(self.setup_path("olc_mmr.conf"),{})
-            rid=1000
+            rid=500
             for url in url_list:
                 serverid=serverid+1
                 olc_serverids_config += read_and_sub_file(self.setup_path("olc_serverid.conf"),
-- 
1.6.0.2
