provision: setup names.name_map['DnsAdmins']
authorStefan Metzmacher <metze@samba.org>
Wed, 23 Jan 2013 14:45:33 +0000 (15:45 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Sun, 27 Jan 2013 09:14:21 +0000 (20:14 +1100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/scripting/python/samba/provision/__init__.py

index d3b0744a4c839dd8ef6016ec874b16b1034fb842..4aff6f68a025ee0529622a053562bc9b43ec744c 100644 (file)
@@ -103,6 +103,7 @@ from samba.provision.common import (
     setup_modify_ldif,
     )
 from samba.provision.sambadns import (
+    get_dnsadmins_sid,
     setup_ad_dns,
     create_dns_update_list
     )
@@ -289,6 +290,10 @@ def find_provision_key_parameters(samdb, secretsdb, idmapdb, paths, smbconf,
         names.root_gid = res9[0]["xidNumber"][0]
     else:
         names.root_gid = pwd.getpwuid(int(res9[0]["xidNumber"][0])).pw_gid
+
+    dns_admins_sid = get_dnsadmins_sid(samdb, names.domaindn)
+    names.name_map['DnsAdmins'] = str(dns_admins_sid)
+
     return names