[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: need an example of using "ldap_search_s" function using the "attr" parameter.
- To: Don jessup <djessup72@yahoo.com>, OpenLDAP Technical List <openldap-technical@openldap.org>
- Subject: Re: need an example of using "ldap_search_s" function using the "attr" parameter.
- From: Quanah Gibson-Mount <quanah@symas.com>
- Date: Thu, 28 Sep 2017 10:02:33 -0700
- Content-disposition: inline
- In-reply-to: <WM!513211880a31884f9fab75fb7588357eea0dc7a25b5d72e26a6fee8ea8cb730977240a20c83c54871bf1cf91da7e0aca!@mailstronghold-2.zmailcloud.com>
- References: <1152791900.1941593.1506380210938.ref@mail.yahoo.com> <1152791900.1941593.1506380210938@mail.yahoo.com> <WM!513211880a31884f9fab75fb7588357eea0dc7a25b5d72e26a6fee8ea8cb730977240a20c83c54871bf1cf91da7e0aca!@mailstronghold-2.zmailcloud.com>
--On Monday, September 25, 2017 11:56 PM +0000 Don jessup
<djessup72@yahoo.com> wrote:
To limit the information coming back from the server I only want the
values of the "sAMAccountName" attribute. Every time I try populating
the "attrs" parameter I get an error. I was wondering if I could be
pointed to an example or 2 that uses the parameter.
ldap_search_s is deprecated, you should be using ldap_search_ext_s instead.
However, libraries/libldap/sasl.c has a trivial example of using attrs with
ldap_search_s:
char *attrs[] = { "supportedSASLMechanisms", NULL };
rc = ldap_search_s( ld, "", LDAP_SCOPE_BASE,
NULL, attrs, 0, &res );
--Quanah
--
Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
<http://www.symas.com>