Univention Bugzilla – Bug 34327
FQDN search broken when combined with filter
Last modified: 2016-03-18 06:44:16 CET
Created attachment 5827 [details] Fix univention.admin.filter.replace_fqdn_filter() +++ This bug was initially created as a clone of Bug #22139 +++ Only the first occurrence of "fqdn=" is replaced, which breaks if fqdn is used multiple times in a LDAP filter expression: # udm computers/computer list --filter '(&(|(cn=ox61)(cn=ox60))(associatedDomain=phahn.dev))' | grep ^DN DN: cn=ox60,cn=dc,cn=computers,dc=phahn,dc=dev DN: cn=ox61,cn=dc,cn=computers,dc=phahn,dc=dev # udm computers/computer list --filter '(|(fqdn=ox61.phahn.dev)(fqdn=ox60.phahn.dev))' | grep ^DN # tail /var/log/univention/directory-manager-cmd.log ... uldap.search filter=...(|(&(cn=ox61)(associatedDomain=phahn.dev))(fqdn=ox60.phahn.dev)))... Code in /usr/share/pyshared/univention/admin/filter.py Also see <http://www.ietf.org/rfc/rfc2254.txt> for LDAP filter string syntax.
Very good patch, thanks. univention-directory-manager-modules (11.0.2-22): r67924 | Bug #34327: fix fqdn search filter univention-directory-manager-modules.yaml: r67925 | YAML Bug #34327
CHANGES: OK YAML: OK
VERIFIED
Testes with: # udm computers/computer list --filter '(&(|(cn=61)(cn=62))(associatedDomain=mydomain.intranet))' | grep ^DN DN: cn=61,cn=computers,dc=mydomain,dc=intranet DN: cn=62,cn=computers,dc=mydomain,dc=intranet # udm computers/computer list --filter '(|(fqdn=61.mydomain.intranet)(fqdn=62.mydomain.intranet))' | grep ^DN DN: cn=61,cn=computers,dc=mydomain,dc=intranet DN: cn=62,cn=computers,dc=mydomain,dc=intranet
<http://errata.software-univention.de/ucs/4.1/131.html>