I found two minor issues and a nuisance with ldap(1).
1) When searching a tree the DN that equals the searchdn is not shown,
resulting in weird (and incorrect) output. According to RFC2849 the
DN must always be shown.
2) If we can't print a single element node we still print the version
line. According to RFC2849 there needs to be at least one
ldif-attrval-record to be valid.
The nuisance, even though correct (and what got me here in the first
When running a search query with attribute 1.1 we don't print anything,
because every ldif-attrval-record requires one or more attrval-spec,
but with a filter of "1.1" we force ldapsearch to skip all attributes.
Since openldap and (from what I gather from the documentation)
idsldapsearch support this behaviour I reckon we could also