Sm_PolicyApi_AddPasswordPolicy()

The function adds a password policy object.
casso127
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 (
    bEntireDir
    is set to true), you must set
    pszPath
    and
    pszClass
    to an empty string. The Policy Management API returns Sm_PolicyAPI_BadArgument if these strings are not empty.
  • When the
    pszPasswordServicesRedirect
    field 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_Success
    The creation was successful
  • Sm_PolicyApi_Failure
    The creation was not successful
  • Sm_PolicyApi_InvalidHandle
    No valid initialization before this call
  • Sm_PolicyApi_NoSession
    No 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