Univention Bugzilla – Bug 44320
dns/host_record without IP address is unaccessible/undeleteable
Last modified: 2023-10-09 08:37:05 CEST
If I create a "dns/host_record" entry without IPv4 and IPv6 addresses, that entry can't be managed by that UDM module, as the "lookup()" filter does not match: zone=$(udm dns/forward_zone list|sed -ne 's/^DN: //p;T;q') udm dns/host_record create --superordinate "$zone" --set name=test udm dns/host_record list --superordinate "$zone" --filter name=test # name=test univention-ldapsearch -LLLo ldif-wrap=no -b "relativeDomainName=test,$zone" -s base # dn: relativeDomainName=test,zoneName=phahn.qa,cn=dns,dc=phahn,dc=qa # objectClass: dNSZone # objectClass: top # objectClass: univentionObject # univentionObjectType: dns/host_record # relativeDomainName: test # dNSTTL: 10800 # zoneName: phahn.qa The entry can be removed using the low-level LDAP tools: ldapdelete -Y EXTERNAL -H ldapi:/// "relativeDomainName=test,$zone" /usr/share/pyshared/univention/admin/handlers/dns/host_record.py: > filter = univention.admin.filter.conjunction('&', [ ... > univention.admin.filter.conjunction('|', [ > univention.admin.filter.expression('aRecord', '*'), > univention.admin.filter.expression('aAAARecord', '*'), > univention.admin.filter.expression('mXRecord', '*'), None of them matches as no IP is assigned. Perhaps we should add a generic '(|(...)(univentionObjectType=$module))'?
Works for me since UCS 4.2 with git:18746283071edd46d06602f4b76c621949d43874 for Bug #40839 with added + univention.admin.filter.expression('tXTRecord', '*'), + univention.admin.filter.expression('univentionObjectType', module), # host record without any record zone=$(udm dns/forward_zone list|sed -ne 's/^DN: //p;T;q') udm dns/host_record create --superordinate "$zone" --set name=test udm dns/host_record list --superordinate "$zone" --filter name=test udm dns/host_record remove --dn "relativeDomainName=test,$zone" *** This bug has been marked as a duplicate of bug 40839 ***