summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2013-05-27 12:37:20 +1000
committerAndrew Bartlett <abartlet@samba.org>2013-05-30 10:44:13 +1000
commit05578dcdbfa1734ae7bafb70859a76f4cd2a023d (patch)
treea0b718ed37d551553c4eca750b7c7e910d991453
parentc22eb103d865ed50a6c3ca89750245b92e17b493 (diff)
downloadsamba-05578dcdbfa1734ae7bafb70859a76f4cd2a023d.tar.gz
samba-05578dcdbfa1734ae7bafb70859a76f4cd2a023d.tar.bz2
samba-05578dcdbfa1734ae7bafb70859a76f4cd2a023d.zip
samba-tool/dns: Set secure zone update flag after creating new zone
Windows DC ignores the secure update flag while creating new zone. Windows performs another operation to set the secure update flag. Signed-off-by: Amitay Isaacs <amitay@gmail.com>
-rw-r--r--python/samba/netcmd/dns.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/python/samba/netcmd/dns.py b/python/samba/netcmd/dns.py
index cce0d66c21..137cd989f0 100644
--- a/python/samba/netcmd/dns.py
+++ b/python/samba/netcmd/dns.py
@@ -854,7 +854,6 @@ class cmd_zonecreate(Command):
zone_create_info = dnsserver.DNS_RPC_ZONE_CREATE_INFO_W2K()
zone_create_info.pszZoneName = zone
zone_create_info.dwZoneType = dnsp.DNS_ZONE_TYPE_PRIMARY
- zone_create_info.fAllowUpdate = dnsp.DNS_ZONE_UPDATE_SECURE
zone_create_info.fAging = 0
zone_create_info.fDsIntegrated = 1
zone_create_info.fLoadExisting = 1
@@ -863,7 +862,6 @@ class cmd_zonecreate(Command):
zone_create_info = dnsserver.DNS_RPC_ZONE_CREATE_INFO_DOTNET()
zone_create_info.pszZoneName = zone
zone_create_info.dwZoneType = dnsp.DNS_ZONE_TYPE_PRIMARY
- zone_create_info.fAllowUpdate = dnsp.DNS_ZONE_UPDATE_SECURE
zone_create_info.fAging = 0
zone_create_info.fDsIntegrated = 1
zone_create_info.fLoadExisting = 1
@@ -873,7 +871,6 @@ class cmd_zonecreate(Command):
zone_create_info = dnsserver.DNS_RPC_ZONE_CREATE_INFO_LONGHORN()
zone_create_info.pszZoneName = zone
zone_create_info.dwZoneType = dnsp.DNS_ZONE_TYPE_PRIMARY
- zone_create_info.fAllowUpdate = dnsp.DNS_ZONE_UPDATE_SECURE
zone_create_info.fAging = 0
zone_create_info.fDsIntegrated = 1
zone_create_info.fLoadExisting = 1
@@ -882,6 +879,15 @@ class cmd_zonecreate(Command):
res = dns_conn.DnssrvOperation2(client_version, 0, server, None,
0, 'ZoneCreate', typeid,
zone_create_info)
+
+ typeid = dnsserver.DNSSRV_TYPEID_NAME_AND_PARAM
+ name_and_param = dnsserver.DNS_RPC_NAME_AND_PARAM()
+ name_and_param.pszNodeName = 'AllowUpdate'
+ name_and_param.dwParam = dnsp.DNS_ZONE_UPDATE_SECURE
+
+ res = dns_conn.DnssrvOperation2(client_version, 0, server, zone,
+ 0, 'ResetDwordProperty', typeid,
+ name_and_param)
self.outf.write('Zone %s created successfully\n' % zone)