summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-06-03 16:56:36 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-06-03 16:57:14 +0200
commit95b4cfc2aeec915c744739bbf362e16b2bd9cd40 (patch)
treee48896051a0d29eb4446ffd62a6944b67f683561 /pykolab
parentcc5158df4a0cd41b715e7a2fd5479e14d1f879b4 (diff)
downloadpykolab-95b4cfc2aeec915c744739bbf362e16b2bd9cd40.tar.gz
Set inetdomainbasedn attribute value for root dns that are not the same as the standard dn for the configured domain name.
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/setup/setup_ldap.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pykolab/setup/setup_ldap.py b/pykolab/setup/setup_ldap.py
index 1f14a5e..9175cc6 100644
--- a/pykolab/setup/setup_ldap.py
+++ b/pykolab/setup/setup_ldap.py
@@ -383,6 +383,12 @@ ServerAdminPwd = %(admin_pass)s
attrs = {}
attrs['objectclass'] = ['top','domainrelatedobject']
attrs['associateddomain'] = '%s' % (_input['domain'])
+
+ # Add inetdomainbasedn in case the configured root dn is not the same as the
+ # standard root dn for the domain name configured
+ if not _input['rootdn'] == utils.standard_root_dn(_input['domain']):
+ attrs['inetdomainbasedn'] = _input['rootdn']
+
ldif = ldap.modlist.addModlist(attrs)
auth._auth.ldap.add_s(dn, ldif)