Previous Topic: General Data Types and Structures

Next Topic: Utility Functions

Initialization and Release Functions

To initialize objects, the SiteMinder Policy Server calls the functions in the following table:

Function Name

Object Initialized by SiteMinder Policy Server

SmDirInit()

Directory provider. Set provider handle.

SmDirInitDirInstance()

Directory instance. Set directory instance handle.

SmDirInitUserInstance()

Directory Entry (User) instance. Set user entry instance handle.

Initializing the Directory Provider

The first time that the custom directory provider is required after the SiteMinder Policy Server is started, the Policy Server calls SmDirInit() to initialize the directory provider. At this point, set the provider handle as shown in the sample code. The SiteMinder Policy Server will not call SmDirInit() again until one of the Policy Server services is started (or re-started).

SmDirInit() is called once per custom directory provider library (.dll or .so).

Initializing the Directory Instance

The Policy Server calls SmDirInitDirInstance() to initialize the directory instance. Set the directory instance handle as shown in the sample code.

SmDirInitDirInstance() is called once per directory instance using this directory provider library. SiteMinder calls the function when it needs a directory context (to perform an operation such as search or get properties) while processing an authentication or authorization request. This function is typically called at the beginning of a request.

Initializing the Directory Entry (User) Instance

The SiteMinder Policy Server initializes the user instance by calling SmDirInitUserInstance(). Set the directory entry (user) instance handle as shown in the sample code.

To release objects, use the functions in the following table:

Function Name

Object Released by SiteMinder Policy Server

SmDirRelease()

Directory provider. Delete provider handle

SmDirReleaseInstance()

Directory or entry instance. Determine which handle is passed.

Releasing the User Instance

The SiteMinder Policy Server calls SmDirReleaseInstance() so that you can release the user instance handle if you choose. Ensure that the handle that is passed is the user instance handle, not the directory instance handle.

Releasing the Directory Instance

The SiteMinder Policy Server calls SmDirReleaseInstance() so that you can release the directory instance handle if you choose. Ensure that the handle that is passed is the directory instance handle, not the user instance handle.

SiteMinder calls SmDirReleaseInstance() once per every call to SmDirInitDirInstance(), after the directory context is no longer needed. It is typically called at the end of a request.

Releasing the Directory Provider

When an administrator starts to shut down the SiteMinder Policy Server, the SiteMinder Policy Server calls SmDirRelease() to release the directory provider.

More Information:

How To Distinguish between Handle Types


Copyright © 2010 CA. All rights reserved. Email CA about this topic