Univention Bugzilla – Attachment 10069 Details for
Bug 49679
S4-Connector breaks SOA records by always appending a missing dot to short mname
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch (git:fbest/49679-dns-append-dot-s4-connector)
49679.patch (text/plain), 1.50 KB, created by
Florian Best
on 2019-06-18 15:05:14 CEST
(
hide
)
Description:
patch (git:fbest/49679-dns-append-dot-s4-connector)
Filename:
MIME Type:
Creator:
Florian Best
Created:
2019-06-18 15:05:14 CEST
Size:
1.50 KB
patch
obsolete
>commit 52aabb48d20f051d6a3fbab95d282e85092ba2d9 >Author: Florian Best <best@univention.de> >Date: Tue Jun 18 15:03:29 2019 +0200 > > Bug #49679: only append dot if host is a FQDN > >diff --git a/services/univention-s4-connector/modules/univention/s4connector/s4/dns.py b/services/univention-s4-connector/modules/univention/s4connector/s4/dns.py >index 9e514d2fd6..6378d2c135 100644 >--- a/services/univention-s4-connector/modules/univention/s4connector/s4/dns.py >+++ b/services/univention-s4-connector/modules/univention/s4connector/s4/dns.py >@@ -432,17 +432,16 @@ def __get_zone_dn(s4connector, zone_name): > return unicode(ldap.dn.dn2str([zone_rdn] + ldap.dn.str2dn(unicode_to_utf8(default_dn))), 'utf8') > > >-def __append_dot(str): >- if str[-1] != '.': >- str += '.' >- return str >+def __append_dot(string): >+ if string and not string.endswith('.') and ':' not in string and '.' in string: >+ string += '.' >+ return string > > >-def __remove_dot(str): >- if str[-1] == '.': >- return str[:-1] >- else: >- return str >+def __remove_dot(string): >+ if string.endswith('.'): >+ return string[:-1] >+ return string > > > def __split_s4_dnsNode_dn(dn): >@@ -1430,9 +1429,7 @@ def ucs_zone_create(s4connector, object, dns_type): > msdcs_soa = __unpack_soaRecord(msdcs_soa_obj) > soa['serial'] = str(max(int(soa['serial']), int(msdcs_soa['serial']))) > >- mname = soa['mname'] >- if mname and not mname.endswith("."): >- mname = "%s." % mname >+ mname = __append_dot(soa['mname']) > > ns_lower = [x.lower() for x in ns] > mname_lower = mname.lower()
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 49679
: 10069