SmDirAddEntry()
The stmndr Policy Server calls SmDirAddEntry() so that you can insert a directory entry (user) into your custom directory. Examples of directory entries are users, groups and roles. For example, if you are using a SQL database and need to add a group, you could use SmDirAddEntry() to insert a record into the groups table (and all related tables) for the database.
casso1283
The
SiteMinder
Policy Server calls SmDirAddEntry() so that you can insert a directory entry (user) into your custom directory. Examples of directory entries are users, groups and roles. For example, if you are using a SQL database and need to add a group, you could use SmDirAddEntry() to insert a record into the groups table (and all related tables) for the database.When adding an entry to a hierarchical directory, it may be helpful to look at the attributes passed in with the entry, such as object class in LDAP.
Syntax
int SM_EXTERN SmDirAddEntry (const Sm_Api_Context_t* lpApiContext,void* pHandle,void* pInstanceHandle,const Sm_PolicyResolution_t nEntryType,const char* lpszEntryDN,const char** lpszAttrNames,const char** lpszAttrValues);
Parameter | I/O | Description |
lpApiContext
| I | Pointer to the API context structure. |
pHandle
| I | The address of the pointer returned by SmDirInit(). |
pInstanceHandle
| I | The address of a pointer to the directory instance handle. |
nEntryType
| I | The Policy resolution of the entry. Policy resolutions are enumerated in Sm_PolicyResolution_t, which is defined in SmApi.h. The following elements of Sm_PolicyResolution_t are valid entry types: Sm_PolicyResolution_Unknown Sm_PolicyResolution_User Sm_PolicyResolution_UserGroup Sm_PolicyResolution_UserRole Sm_PolicyResolution_Org |
lpszEntryDN
| I | Buffer containing the distinguished name for the entry being added. |
lpszAttrNames
| I | Buffer containing the names of the entry attributes. |
lpszAttrValues
| I | Buffer containing the values of the entry attributes. |
Returns
Returns 0 if successful or -1 if not successful.
Remarks
This function is called when Delegated Management Services is used to create directory entries, including users or roles.