Looks up the user specification in a user directory.
pszSearchPattern holds the search pattern for the lookup. User directory searches vary for each type of user directory namespaces.
Type
User directory function, global scope.
Syntax
int SM_EXTERN Sm_PolicyApi_LookupDirectoryEntry ( void* pSessionHandle, const char* pszUserDirOid, const char* pszSearchPattern, Sm_PolicyApi_User_t** ppStructUserSpec );
Parameter |
I/O |
Description |
---|---|---|
pSessionHandle |
I |
A pointer to an internal Policy Management API data structure. The structure holds information about the administrator session and the client session. |
pszUserDirOid |
I |
A null-terminated string containing the object identifier of the user directory where lookup is to be performed. |
pszSearchPattern |
I |
A null-terminated string containing the search pattern for the lookup. Information about the search expression grammar for different namespace types appears in the section below. |
ppStructUserSpec |
O |
The address of a pointer to a user structure. |
The search in an LDAP user directory can be based on an attribute-value pair or on an LDAP search expression.
<attribute-name>=<value>
For example if <attribute-name> is disabled and <value> is 0, the LDAP search filter is:
Base:'o=airius.com',
Filter:
'(& (|(objectclass=organizationalPerson) (objectclass=inetOrgPerson) (objectclass=organization) (objectclass=organizationalUnit) (objectclass=groupOfNames) (objectclass=groupOfUniqueNames) (objectclass=group) ) (disabled=0) )'
Base:'o=airius.com',
Filter:
'(& (|(objectclass=organizationalPerson) (objectclass=inetOrgPerson) (objectclass=organization) (objectclass=organizationalUnit) (objectclass=groupOfNames) (objectclass=groupOfUniqueNames) (objectclass=group) ) (uid=user1111) )'
You can search in an ODBC user directory for users, groups, or both. The search is based on attribute-value pairs.
The format of pszSearchPattern is:
[ <class>= ] <value>
In the format example:
Returns
Copyright © 2014 CA.
All rights reserved.
|
|