Sm_PolicyApi_AddPasswordPolicy()
The function adds a password policy object.
sm1252sp1
The function adds a password policy object.
Note the following criteria about Sm_PolicyApi_PasswordPolicy_t:
- When the password policy applies to an entire directory (bEntireDiris set to true), you must setpszPathandpszClassto an empty string. The Policy Management API returns Sm_PolicyAPI_BadArgument if these strings are not empty.
- When thepszPasswordServicesRedirectfield is set to an empty string, the Policy Management API sets it to a default URL:/siteminderagent/forms/smpwservices.fcc
Type
Password policy function, global scope.
Syntax
int SM_EXTERN Sm_PolicyApi_AddPasswordPolicy (void*pSessionHandle,Sm_PolicyApi_PasswordPolicy_t*pstructPasswordPolicy,const boolbUpdate);
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. |
pstructPassword
Policy
| I | The address of a pointer to a Sm_PolicyApi_PasswordPolicy_t structure containing information about password policy. |
bUpdate
| I | A flag to indicate that if an existing object is found, it should be updated. |
Returns
- Sm_PolicyApi_SuccessThe creation was successful
- Sm_PolicyApi_FailureThe creation was not successful
- Sm_PolicyApi_InvalidHandleNo valid initialization before this call
- Sm_PolicyApi_NoSessionNo valid administrator session
- Sm_PolicyApi_NoPrivilege The administrator does not have the permission to create a password policy
- Sm_PolicyApi_InvalidOid:
- The password policy OID was not found during an update
- The user directory OID was not found
- Sm_PolicyApi_BadArgument The path and class are empty