Sm_PolicyApi_AddPolicyLink()

The function creates a stmndr policy link for the policy that is identified by pszPolicyOid.
casso126
The function creates a 
CA Single Sign-On
policy link for the policy that is identified by
pszPolicyOid
.
A policy link object binds a policy to a rule and, optionally, a response. The attributes of the new policy link are contained in the
pstructPolicyLink
structure.
If the policy link exists and the
bUpdate
flag is true, the item is updated.
Type
Policy function, domain scope.
Syntax
int SM_EXTERN Sm_PolicyApi_AddPolicyLink (
void*pSessionHandle,constpszPolicyOid, Sm_PolicyApi_PolicyLink_t*pstructPolicyLink
);
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.
pszPolicyOid
I
A null-terminated string containing the object identifier of an existing policy.
pstructPolicyLink
I
A pointer to a completely filled-in policy link structure.
Returns
  • Sm_PolicyApi_Success
    The policy link was created successfully
  • Sm_PolicyApi_Failure:
    • The domain of a rule OID is not the same as the domain of the policy OID
    • The domain of a response OID is not the same as the domain of the policy OID
  • 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 link
  • Sm_PolicyApi_InvalidOid:
    • The policy OID was not found
    • The rule or rule group OID was not found
    • The response or response group OID was not found