Univention Bugzilla – Bug 40839
dns/txt_record detecs e.g. host records as TXT record in lookup()
Last modified: 2023-10-09 08:37:05 CEST
>>> univention.admin.handlers.dns.txt_record.lookup(None, lo, '', superordinate=superordinate)[0].oldattr {'aRecord': ['1.2.3.4'], 'objectClass': ['top', 'dNSZone', 'univentionObject'], 'univentionObjectType': ['dns/host_record'], 'dNSTTL': ['10800'], 'tXTRecord': ['oixaajny'], 'relativeDomainName': ['pawnldyp'], 'zoneName': ['nuvbvnoc']} This causes some bugs: * It is displayed twice in UMC * There are exceptions like KeyError when accessing specific properties. * …?!
The situation gets better when adding the following filter in lookup(): (|(univentionObjectType=)(univentionObjectType=dns/txt_record)) And identify() should also be adjusted accordingly. But the general problem is also that we don't set univentionObjectType correctly so that we can't really identify what this actually really is. e.g. Bug #38073. As we can't use univentionObjectType for identification due to backwards compatibility can we somehow else identify this reliable? Excluding objects with specific attributes (aRecord) seems for me to be a workaround.
LDIF: dn: relativeDomainName=pawnldyp,zoneName=nuvbvnoc,cn=dns,dc=school,dc=local aRecord: 1.2.3.4 objectClass: top objectClass: dNSZone objectClass: univentionObject univentionObjectType: dns/host_record dNSTTL: 10800 relativeDomainName: pawnldyp zoneName: nuvbvnoc tXTRecord: oixaajny
Created attachment 7519 [details] patch
*** Bug 41001 has been marked as a duplicate of this bug. ***
This causes also that the entry is detected twice as host record when searching regular underneath of a forward zone (Bug #41001).
Create such an object: eval "$(ucr shell)" udm dns/forward_zone create --position "cn=dns,$ldap_base" --set zoneName=nuvbvnoc --set zone=nuvbvnoc --set nameserver=localhost udm dns/host_record create --superordinate "zoneName=nuvbvnoc,cn=dns,$ldap_base" --set name=pawnldyp --set a=1.2.3.4 udm 'dns/host_record' modify --superordinate "zoneName=nuvbvnoc,cn=dns,$ldap_base" --dn "relativeDomainName=pawnldyp,zoneName=nuvbvnoc,cn=dns,$ldap_base" --set "txt=oixaajny" univention-directory-manager 'dns/host_record' list --superordinate "zoneName=nuvbvnoc,cn=dns,$ldap_base" --filter relativeDomainName=pawnldyp | egrep '^ *txt: ' | sed 's/^ *txt: //'
There is a Customer ID set so I set the flag "Enterprise Customer affected".
Fixed with a different patch which doesn't rely fully on univentionObjectType. univention-directory-manager-modules (12.0.17-70): r80966 | Bug #40839: fix detection of txt/host records univention-directory-manager-modules.yaml: r80968 | YAML Bug #40839
OK Host records not detected in txt_record lookup Displayed only once YAML: OK -> verified
*** Bug 32235 has been marked as a duplicate of this bug. ***
<http://errata.software-univention.de/ucs/4.2/115.html>
*** Bug 44078 has been marked as a duplicate of this bug. ***
*** Bug 44320 has been marked as a duplicate of this bug. ***