Previous Topic: Sm_PolicyApi_Logout()Next Topic: Sm_PolicyApi_ManagementCommand()


Sm_PolicyApi_LookupDirectoryEntry()

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.

Search Expression Grammar for an LDAP Namespace

The search in an LDAP user directory can be based on an attribute-value pair or on an LDAP search expression.

Search Expression Grammar for ODBC, WinNT and Custom Namespaces

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