Univention Bugzilla – Bug 33583
ldapsearch result truncated if DN is longer than LDIF line wrap length
Last modified: 2013-12-12 11:30:01 CET
Seen in /usr/lib/univention-install/96univention-samba4.inst lines #500 and #594: a DN is retrieved by ldapsearch or univention-ldapsearch and a pipe into sed: group_dn="$(univention-ldapsearch -x "(&(objectClass=univentionGroup)(cn=$name))" | sed -ne 's|dn: ||p')" If the given dn (with the 'dn: ' prefix) exceeds the builtin line wrap length the result doesn't contain the leftover chars of the continuation line. Reference: Ticket#2013112121006746 Expected behavior: DNs of arbitrary length will be properly retrieved Short solution: in this one script, add -o ldif-wrap=no to the given (univention-)ldapsearch lines Long solution (proposal): incorporate the argument into univention-ldapsearch by default, would cure other occurrences too.
Sorry, forgot to set version number.
(In reply to Frank Greif from comment #0) > Short solution: > in this one script, add > > -o ldif-wrap=no > > to the given (univention-)ldapsearch lines Propably missing "| ldapsearch-wrapper". group_dn="$(univention-ldapsearch -x "(&(objectClass=univentionGroup)(cn=$name))" | sed -ne 's|dn: ||p')" → group_dn="$(univention-ldapsearch -x "(&(objectClass=univentionGroup)(cn=$name))" | ldapsearch-wrapper | sed -ne 's|dn: ||p')"
Should be fixed with the next univention-samba4 erratum.
univention-samba4: 3.0.39-7.563.201312061111 YAML: 2013-11-20-univention-samba4.yaml ldapsearch-wrapper has been added to univention-ldapsearch calls in samba4 related setup scripts to prevent line wrapping of search results.
Created attachment 5690 [details] patch additional lines Maybe fix those as well? They are non-critical but this makes things consistent.
(In reply to Arvid Requate from comment #5) > Created attachment 5690 [details] > patch additional lines > > Maybe fix those as well? They are non-critical but this makes things > consistent. done
Verified: * All ldapsearches in the package are fixed. * Advisory OK
http://errata.univention.de/ucs/3.2/6.html