Sm_PolicyApi_AddPolicy()

The function creates a stmndr policy. The policy attributes are contained in the pStructPolicy structure.
casso126
The function creates a
CA Single Sign-On
policy. The policy attributes are contained in the
pStructPolicy
structure.
If the policy exists and the
bUpdate
flag is true, the item is updated.
Type
Policy function, domain scope.
Syntax
int SM_EXTERN Sm_PolicyApi_AddPolicy (
void*pSessionHandle,
Sm_PolicyApi_Policy_t*pStructPolicy,
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.
pStructPolicy
I
A pointer to a completely filled-in policy structure.
bUpdate
I
A flag to indicate that if an existing object is found, it should be updated.
 Returns
  • Sm_PolicyApi_Success
    The policy was created successfully
  • Sm_PolicyApi_Failure
    The policy was not created successfully
  • 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 policy
  • Sm_PolicyApi_InvalidOid:
    • The policy OID was not found during an update
    • The domain OID was not found