Sm_PolicyApi_AddGlobalRule()

The function creates a new global rule in the object store.
casso10
The function creates a new global rule in the object store.
Type
Rule function, global scope.
Syntax
int SM_EXTERN Sm_PolicyApi_AddGlobalRule (
void*pSessionHandle,
Sm_PolicyApi_Rule_t*pStructRule,
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.
pStructRule
I
A pointer to a completely filled-in rule structure. The realm OID in the structure 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 rule was created successfully
  • Sm_PolicyApi_Failure
    The global rule 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 rule
  • Sm_PolicyApi_InvalidOid:
    • A global rule with a matching OID was not found during an update
    • An agent or agent group with matching OID was not found
  • Sm_PolicyApi_NotImplemented: The client who called this function initialized the API with a version less than SM_POLICY_API_VERSION_6_0