[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Call for change of ldapsearch results (ITS#484)



At 08:22 PM 3/17/00 GMT, evenh+ldap@pvv.ntnu.no wrote:
>Full_Name: Even Holen
>Version: 1.2.7 
>OS: A lot...
>URL: ftp://ftp.openldap.org/incoming/
>Submission from: (NULL) (129.241.92.103)
>
>
>When using the client tool ldapsearch, I've noticed that it always prints the
>'dn' field.

Yes, becauses returning entries always contain a DN.

>And to make it even easier to do such a search I would suggest an option to
>return only the _values_.

As there is no such protocol option, I don't think the command should
have such an option.  ldapsearch is meant to relate to the LDAP search
operation.

>You've got an option for only attributes, but not for only values.

Note that that option is a protocol request option:
   -A  retrieve attribute names only (no values)

and not an output processing option.

>In other words I would like my example to be something like:
> ldapsearch -N -V -h somewhere -b "o=ntnu,c=no" -s sub "uid=evenh" mail
>which would return, say:   evenh+ldap@pvv.ntnu.no
>instead of:
>  uid=evenh, o=ntnu, c=no
>  mail=evenh+ldap@pvv.ntnu.no

A value is meaningless without knowing the attribute type.  If
the server supports subtyping (OpenLDAP 1.x doesn't, but others do),
a search (not I'll use LDIF output for clarity):

  ldapsearch -F -h somewhere -b "o=ntnu,c=no" -s sub "uid=evenh" mail
  dn: uid=evenh, o=ntnu, c=no
  mail-subtype: pvv.ntnu.no!evenh+ldap

  dn: cn=xyz, o=ntnu, c=no

The output demonstrates that the search could return multiple
entries (any in the scope that match the filter), that subtypes of
the attribute mail may be returned, that entries that do not contain
the type be returned.

As such, I believe that processing of returned results is best
left to other programs.