Univention Bugzilla – Attachment 7066 Details for
Bug 39040
No DNS Zone attribute changes synced from Samba to UCS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix_soa_sync_con2ucs.patch
fix_soa_sync_con2ucs.patch (text/plain), 2.67 KB, created by
Arvid Requate
on 2015-07-29 17:39:20 CEST
(
hide
)
Description:
fix_soa_sync_con2ucs.patch
Filename:
MIME Type:
Creator:
Arvid Requate
Created:
2015-07-29 17:39:20 CEST
Size:
2.67 KB
patch
obsolete
>Index: modules/univention/s4connector/s4/dns.py >=================================================================== >--- modules/univention/s4connector/s4/dns.py (Revision 61284) >+++ modules/univention/s4connector/s4/dns.py (Arbeitskopie) >@@ -35,6 +35,8 @@ > import univention.debug2 as ud > import univention.s4connector.s4 > import univention.admin.uldap >+from univention.s4connector.s4.dc import _unixTimeInverval2seconds >+from univention.admin.mapping import unmapUNIX_TimeInterval > > from samba.dcerpc import dnsp > from samba.ndr import ndr_print >@@ -742,6 +744,7 @@ > mx=__unpack_mxRecord(object) > > # Does a zone already exist? >+ modify = False > searchResult=s4connector.lo.search(filter='(&(relativeDomainName=%s)(zoneName=%s))' % (relativeDomainName, zoneName), unique=1) > if len(searchResult) > 0: > if dns_type == 'forward_zone': >@@ -753,13 +756,17 @@ > if soa['mname'] not in ns: > ns.insert(0, soa['mname']) > zone['nameserver'] = ns >- if soa['rname'] != zone['contact']: >+ modify = True >+ if soa['rname'].replace('.', '@', 1) != zone['contact'].rstrip('.'): > zone['contact'] = soa['rname'].replace('.', '@', 1) >- if set(soa['serial']) != set(zone['serial']): >+ modify = True >+ if long(soa['serial']) != long(zone['serial']): > zone['serial'] = soa['serial'] >- for k in ['serial', 'refresh', 'retry', 'expire', 'ttl']: >- if set(soa[k]) != set(zone[k]): >- zone[k] = [soa[k]] >+ modify = True >+ for k in ['refresh', 'retry', 'expire', 'ttl']: >+ if long(soa[k]) != _unixTimeInverval2seconds(zone[k]): >+ zone[k] = unmapUNIX_TimeInterval(soa[k]) >+ modify = True > if dns_type == 'forward_zone': > # The IP address of the DNS forward zone will be used to determine the > # sysvol share. On a selective replicated DC only a short list of DCs >@@ -769,10 +776,14 @@ > if not aRecords and not aAAARecords: > if set(a) != set(zone['a']): > zone['a'] = a >+ modify = True > if mx: > mapMX=lambda m: '%s %s' % (m[0], m[1]) > if set(map(mapMX,mx)) != set(map(mapMX,zone['mx'])): > zone['mx'] = mx >+ modify = True >+ if modify: >+ zone.modify() > else: > position=univention.admin.uldap.position( s4connector.property['dns'].ucs_default_dn ) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 39040
: 7066