Sm_PolicyApi_AddGlobalPolicy()

The function creates a new global policy in the object store. The policy attributes are contained in the pStructPolicy structure.
casso10
The function creates a new global policy in the object store. 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, global scope.
Syntax
int SM_EXTERN Sm_PolicyApi_AddGlobalPolicy (
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 filled policy structure. The domain of the structure domain OID is ignored.
bUpdate
I
A flag to indicate that if an existing object is found, it should be updated.
 Returns
  • Sm_PolicyApi_Success
    The global policy was created successfully
  • Sm_PolicyApi_Failure
    The global 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 global policy
  • Sm_PolicyApi_NotImplemented:
    The client who called this function initialized the API with a version less than SM_POLICY_API_VERSION_6_0