#include <eim.h> int eimRemovePolicyFilter(EimHandle * eim, EimPolicyFilterInfo * filterInfo, EimRC * eimrc)Service Program Name: QSYS/QSYEIM
The eimRemovePolicyFilter() function removes the specified policy filter from the domain. When a policy filter is removed, all policy associations to the policy filter are also removed.
EIM version 2 must be supported by the local EIM APIs to use this API (see eimGetVersion()--Get EIM Version).
The EimPolicyFilterInfo structure contains information about the policy filter to remove.
For EIM_CERTIFICATE_FILTER (1) policy filter type, the filter field must contain an EimCertificatePolicyFilter structure.
The structure layouts follow:
enum EimPolicyFilterType { EIM_ALL_FILTERS, /* All policy filters -- not supported for this interface. */ EIM_CERTIFICATE_FILTER /* Policy filter is a certificate filter. */ }; typedef struct EimCertificatePolicyFilter { char * sourceRegistry; /* The source registry to remove the policy filters from. */ char * filterValue; /* The policy filter value. A NULL value will remove all policy filter values from the registry*/ } EimCertificatePolicyFilter; typedef struct EimPolicyFilterInfo { enum EimPolicyFilterType type; union { EimCertificatePolicyFilter certFilter; } filter; } EimPolicyFilterInfo;
The return value from the API. Following each return value is the list of possible values for the messageCatalogMessageID field in the eimrc parameter for that value.
EIMERR_ACCESS (1) | Insufficient access to EIM data. |
EIMERR_NOREG (28) | EIM Registry not found or insufficient access to EIM data. |
EIMERR_NOLOCK (26) | Unable to allocate internal system object. |
EIMERR_DATA_CONVERSION (13) | Error occurred when converting data between code pages. |
EIMERR_HANDLE_INVAL (17) | EimHandle is not valid. |
EIMERR_PARM_REQ (34) | Missing required parameter. Please check API documentation. |
EIMERR_PTR_INVAL (35) | Pointer parameter is not valid. |
EIMERR_POLICY_FILTER_TYPE_INVAL (60) | Policy filter type is not valid. |
EIMERR_REGTYPE_INVAL (62) | Registry type is not valid. |
EIMERR_FUNCTION_NOT_SUPPORTED (70) | The specified function is not supported by the EIM version. |
EIMERR_NOMEM (27) | No memory available. Unable to allocate required space. |
EIMERR_NOT_CONN (31) | Not connected to LDAP. Use eimConnect() API and try the request again. |
EIMERR_READ_ONLY (36) | LDAP connection is for read only. Use eimConnectToMaster() to get a write connection. |
EIMERR_LDAP_ERR (23) | Unexpected LDAP error. %s |
EIMERR_UNKNOWN (44) | Unknown error or unknown system state. |
EIMERR_UNEXP_OBJ_ VIOLATION (56) | Unexpected object violation. |
The following example removes all certificate policy filters for the registry.
Note: By using the code examples, you agree to the terms of the Code license and disclaimer information.
#include <eim.h> #include <stddef.h> #include <stdio.h> #include <stdlib.h> int main (int argc, char *argv[]) { int rc; char eimerr[100]; EimRC * err; EimHandle * handle; EimPolicyFilterInfo filterInfo; /* Set up error structure. */ memset(eimerr,0x00,100); err = (EimRC *)eimerr; err->memoryProvidedByCaller = 100; /* Get eim handle from input arg. */ /* This handle is already connected to EIM. */ handle = (EimHandle *)argv[1]; /* Set up policy information */ filterInfo.type = EIM_CERTIFICATE_FILTER; filterInfo.filter.certFilter.sourceRegistry = "MySourceRegistry"; filterInfo.filter.certFilter.filterValue = NULL; /* Remove the policy filter */ if (0 != (rc = eimRemovePolicyFilter(handle, &filterInfo, err))) { printf("Remove EIM Policy Filter error = %d", rc); return -1; } return 0; }
[ Back to top | Security APIs | APIs by category ]