14.02.2014 Views

ldapv3.pdf 7947KB Apr 17 2013 11:30:42 AM - mirror omadata

ldapv3.pdf 7947KB Apr 17 2013 11:30:42 AM - mirror omadata

ldapv3.pdf 7947KB Apr 17 2013 11:30:42 AM - mirror omadata

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

la[0] = "givenname";<br />

la[1] = "sn";<br />

la[2] = NULL;<br />

Simple C LDAP Query<br />

if (ldap_search_s(ld,<br />

“dc=whitemice,dc=org”,<br />

LDAP_SCOPE_SUBTREE,<br />

“(objectclass=person)”,<br />

la,<br />

0,<br />

&r) != LDAP_SUCCESS) {<br />

perror("ldap search failed");<br />

}<br />

Search<br />

Create a NULL terminated array of the attributed we<br />

want to receive from the DSA.<br />

The struct which represents our<br />

connection to the DSA<br />

Search base<br />

Search scope<br />

Search filter<br />

Our NULL terminated array<br />

of attribute names.<br />

1 = Provide values of attributes<br />

The struct we will use when referring to<br />

the results of this operation

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!