summaryrefslogtreecommitdiffstats
path: root/ipa_server
diff options
context:
space:
mode:
Diffstat (limited to 'ipa_server')
-rw-r--r--ipa_server/plugins/b_ldap.py10
-rw-r--r--ipa_server/updates/groupofhosts.update5
2 files changed, 15 insertions, 0 deletions
diff --git a/ipa_server/plugins/b_ldap.py b/ipa_server/plugins/b_ldap.py
index fd78b3622..b58a644a3 100644
--- a/ipa_server/plugins/b_ldap.py
+++ b/ipa_server/plugins/b_ldap.py
@@ -60,6 +60,16 @@ class ldap(CrudBackend):
self.api.env.basedn,
)
+ def make_hostgroup_dn(self, cn):
+ """
+ Construct group of hosts dn from cn.
+ """
+ return 'cn=%s,%s,%s' % (
+ self.dn.escape_dn_chars(cn),
+ self.api.env.container_hostgroup,
+ self.api.env.basedn,
+ )
+
def make_service_dn(self, principal):
"""
Construct service principal dn from principal name
diff --git a/ipa_server/updates/groupofhosts.update b/ipa_server/updates/groupofhosts.update
new file mode 100644
index 000000000..fb39c5e25
--- /dev/null
+++ b/ipa_server/updates/groupofhosts.update
@@ -0,0 +1,5 @@
+dn: cn=hostgroups,cn=accounts,$SUFFIX
+add:objectClass: top
+add:objectClass: nsContainer
+add:cn: hostgroups
+