Open davidcoutadeur opened 3 months ago
For the record, there is already an already an option that does nearly this feature, except it writes in multiple files the output of non-ascii values. See option -t and -tt in the manual
Example:
ldapsearch -x -H 'ldap://localhost:389' -D 'cn=Manager,dc=my-domain,dc=com' -w secret -b 'ou=people,dc=my-domain,dc=com' -LLL '(uid=test)' -tt
dn: uid=test,ou=people,dc=my-domain,dc=com
uid:< file:///tmp/ldapsearch-uid-HWN9yG
agriLienStructure:< file:///tmp/ldapsearch-agriLienStructure-AL2E9z
sn:< file:///tmp/ldapsearch-sn-U7N1vA
objectClass:< file:///tmp/ldapsearch-objectClass-OqHGrt
objectClass:< file:///tmp/ldapsearch-objectClass-sPt136
objectClass:< file:///tmp/ldapsearch-objectClass-LuLTVG
objectClass:< file:///tmp/ldapsearch-objectClass-zecD77
objectClass:< file:///tmp/ldapsearch-objectClass-BqSCUQ
objectClass:< file:///tmp/ldapsearch-objectClass-5ZUWw1
agriAncienMel:< file:///tmp/ldapsearch-agriAncienMel-e5mRyd
userCertificate;binary:< file:///tmp/ldapsearch-userCertificate;binary-fyalQa
mobile:< file:///tmp/ldapsearch-mobile-5Q0f6l
mail:< file:///tmp/ldapsearch-mail-BcAdfn
cn:< file:///tmp/ldapsearch-cn-ZPKF7z
userPassword:< file:///tmp/ldapsearch-userPassword-JnJ8Ab
description:< file:///tmp/ldapsearch-description-a7Jna9
add an option to ldapsearch for not encoding values to base64 (like ldif-wrap=no for not wrapping the lines)
Two options for this need:
We have to think about the implications about binary values: do we have a way to detect them and still encode them even if the option is passed?