Hello,
I have defined an instance and have the ACLs set such that the
Administrator group in my defined tree has full access to everything. I
can add/edit/delete/search for users just fine. The part I'm stuck on
is during the search I would also like to retrieve the account
information like active, inactive, locked etc... I've tried using a
server control in the search request with LDAP_CONTROL_ACCOUNT_USABLE as
the control. The request completes successfully but I don't seem to get
any account status info back. I was expecting to see an LDAPuserstatus
structure returned in the control. I haven't been able to find an
example that does something like this. This is what I've done so far:
LDAPControl* serverctrls[2] = {NULL, NULL};
LDAPMessage *ldapResp;
string baseDN = "ou=people,dc=example,dc=com";
string filter = "(cn=";
filter.append(userId);
filter.append(")");
// set timeout for 5min
timeoutVal.tv_sec = 300;
timeoutVal.tv_usec = 0;
ldap_create_userstatus_control(m_connection, 1, &serverctrls[0]);
retCode = ldap_search_ext_s(m_connection,
baseDN.c_str(),
LDAP_SCOPE_SUBTREE,
filter.c_str(),
NULL,
0,
serverctrls,
NULL,
&timeoutVal,
LDAP_NO_LIMIT,
&ldapResp);
Anyone see anything wrong, or knows of any examples somewhere I could
look at?
Thanks in advance!
============================================================
The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader
of this message is not the intended recipient, or an employee
or agent responsible for delivering this message to the
intended recipient, you are hereby notified that any reproduction,
dissemination or distribution of this communication is strictly
prohibited. If you have received this communication in error,
please notify us immediately by replying to the message and
deleting it from your computer. Thank you. Tellabs
============================================================
_______________________________________________
dev-tech-ldap mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-ldap