diff options
author | Amitay Isaacs <amitay@gmail.com> | 2012-01-03 13:51:00 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2012-01-03 05:26:32 +0100 |
commit | 90f06d69f02072d7b76fe2fa80963d6bf82c2bae (patch) | |
tree | 64eeb0623d6a8235f2b90807cabbf191ce65c4e0 /source4 | |
parent | 4fd1220f9ab3e205620256a9c085bfc8de3ddc63 (diff) | |
download | samba-90f06d69f02072d7b76fe2fa80963d6bf82c2bae.tar.gz samba-90f06d69f02072d7b76fe2fa80963d6bf82c2bae.tar.bz2 samba-90f06d69f02072d7b76fe2fa80963d6bf82c2bae.zip |
s4-provision: Fix the problem of DnsProperty values not being set correctly
DnsProperty can have empty 'data' member. To parse Dnsproperty with
empty data, dnsp.idl has a hack as follows:
[switch_is(wDataLength?id:DSPROPERTY_ZONE_EMPTY)] dnsPropertyData data;
This implies, to set 'data' value, wDataLength has to be set to a non-zero
value first.
Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Tue Jan 3 05:26:32 CET 2012 on sn-devel-104
Diffstat (limited to 'source4')
-rw-r--r-- | source4/scripting/python/samba/provision/sambadns.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/provision/sambadns.py b/source4/scripting/python/samba/provision/sambadns.py index 5fa022bea1..db98f13ddd 100644 --- a/source4/scripting/python/samba/provision/sambadns.py +++ b/source4/scripting/python/samba/provision/sambadns.py @@ -144,6 +144,7 @@ class SRVRecord(dnsp.DnssrvRpcRecord): class TypeProperty(dnsp.DnsProperty): def __init__(self, zone_type=dnsp.DNS_ZONE_TYPE_PRIMARY): super(TypeProperty, self).__init__() + self.wDataLength = 1 self.version = 1 self.id = dnsp.DSPROPERTY_ZONE_TYPE self.data = zone_type @@ -151,6 +152,7 @@ class TypeProperty(dnsp.DnsProperty): class AllowUpdateProperty(dnsp.DnsProperty): def __init__(self, allow_update=dnsp.DNS_ZONE_UPDATE_SECURE): super(AllowUpdateProperty, self).__init__() + self.wDataLength = 1 self.version = 1 self.id = dnsp.DSPROPERTY_ZONE_ALLOW_UPDATE self.data = allow_update @@ -158,6 +160,7 @@ class AllowUpdateProperty(dnsp.DnsProperty): class SecureTimeProperty(dnsp.DnsProperty): def __init__(self, secure_time=0): super(SecureTimeProperty, self).__init__() + self.wDataLength = 1 self.version = 1 self.id = dnsp.DSPROPERTY_ZONE_SECURE_TIME self.data = secure_time @@ -165,6 +168,7 @@ class SecureTimeProperty(dnsp.DnsProperty): class NorefreshIntervalProperty(dnsp.DnsProperty): def __init__(self, norefresh_interval=0): super(NorefreshIntervalProperty, self).__init__() + self.wDataLength = 1 self.version = 1 self.id = dnsp.DSPROPERTY_ZONE_NOREFRESH_INTERVAL self.data = norefresh_interval @@ -172,6 +176,7 @@ class NorefreshIntervalProperty(dnsp.DnsProperty): class RefreshIntervalProperty(dnsp.DnsProperty): def __init__(self, refresh_interval=0): super(RefreshIntervalProperty, self).__init__() + self.wDataLength = 1 self.version = 1 self.id = dnsp.DSPROPERTY_ZONE_REFRESH_INTERVAL self.data = refresh_interval @@ -179,6 +184,7 @@ class RefreshIntervalProperty(dnsp.DnsProperty): class AgingStateProperty(dnsp.DnsProperty): def __init__(self, aging_enabled=0): super(AgingStateProperty, self).__init__() + self.wDataLength = 1 self.version = 1 self.id = dnsp.DSPROPERTY_ZONE_AGING_STATE self.data = aging_enabled @@ -186,6 +192,7 @@ class AgingStateProperty(dnsp.DnsProperty): class AgingEnabledTimeProperty(dnsp.DnsProperty): def __init__(self, next_cycle_hours=0): super(AgingEnabledTimeProperty, self).__init__() + self.wDataLength = 1 self.version = 1; self.id = dnsp.DSPROPERTY_ZONE_AGING_ENABLED_TIME self.data = next_cycle_hours |