Go to main content

man pages section 3: Remote Administration Daemon Module Interfaces

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

compliance_mgr-1 (3rad)

Name

compliance_mgr-1 - Solaris Compliance

Synopsis

#include <rad/client/1/compliance_mgr.h>
cc [ flag... ] file... -lcompliance_mgr1_client [ library... ]

interface Assessment
const char * uuid ; (ro)
const compliance_mgr__rad_dict_string_opaque_t * contents ; (rw)
const compliance_mgr__rad_dict_string_string_t * metadata ; (ro)
compliance_mgr_AssessmentStatus_t state ; (rw)

rc_err_t compliance_mgr_Assessment__rad_create(rc_instance_t *inst,
const char *uuid,
const char *name,
const char *benchmark,
const char *profile,
const char *tailoring,
const char *match,
const char *store,
rc_instance_t **result,
compliance_mgr_CMError_t **error);

rc_err_t compliance_mgr_Assessment__rad_delete(rc_instance_t *inst,
compliance_mgr_CMError_t **error);

typedef void (*compliance_mgr_Assessment_AssessmentProgress_cb_f)(rc_instance_t *inst,
compliance_mgr_AssessmentProgress_t *payload,
struct timespec ts,
void *arg);

rc_err_t compliance_mgr_Assessment_subscribe_AssessmentProgress(rc_instance_t *inst,
compliance_mgr_Assessment_AssessmentProgress_cb_f cb,
void *arg);

rc_err_t compliance_mgr_Assessment_unsubscribe_AssessmentProgress(rc_instance_t *inst,
void **arg);

interface Benchmark
const char * name ; (ro)
const char * title ; (ro)
const char ** profiles ; (ro)

rc_err_t compliance_mgr_Benchmark_get_descriptions(rc_instance_t *inst,
const char *tailoring,
compliance_mgr_RuleDescriptor_t ***result,
int *result_cnt,
compliance_mgr_CMError_t **error);

interface Tailoring
const char * name ; (ro)

Enumerated Types
enum CMRetErrCode

typedef enum compliance_mgr_CMRetErrCode {
CMCMREC_CMRE_OK = 0,
CMCMREC_CMRE_GENERAL_ERROR = 1,
CMCMREC_CMRE_BAD_ARGS = 2,
CMCMREC_CMRE_PARTIAL_SUCCESS = 3,
CMCMREC_CMRE_EXISTS = 4,
CMCMREC_CMRE_BUSY = 5,
CMCMREC_CMRE_ACCESS = 6,
CMCMREC_CMRE_UNANTICIPATED = 99,
} compliance_mgr_CMRetErrCode_t;

enum AssessmentStatus

typedef enum compliance_mgr_AssessmentStatus {
CMAS_AS_CREATING = 0,
CMAS_AS_RUNNING = 1,
CMAS_AS_COMPLETE = 2,
CMAS_AS_ERROR = 3,
CMAS_AS_ABORT = 4,
} compliance_mgr_AssessmentStatus_t;

Structured Types
struct CMError

typedef struct compliance_mgr_CMError compliance_mgr_CMError_t;

struct compliance_mgr_CMError {
compliance_mgr_CMRetErrCode_t cmcme_error_code;
char *cmcme_error_message;
};


void compliance_mgr_CMError_free(compliance_mgr_CMError_t *in);

struct AssessmentProgress

typedef struct compliance_mgr_AssessmentProgress
compliance_mgr_AssessmentProgress_t;

struct compliance_mgr_AssessmentProgress {
compliance_mgr_AssessmentStatus_t cmap_state;
char *cmap_message;
compliance_mgr_CMRetErrCode_t cmap_err_code;
};


void compliance_mgr_AssessmentProgress_free(compliance_mgr_AssessmentProgress_t *in);

struct RuleDescriptor

typedef struct compliance_mgr_RuleDescriptor
compliance_mgr_RuleDescriptor_t;

struct compliance_mgr_RuleDescriptor {
char *cmrd_ruleid;
char *cmrd_title;
char *cmrd_description;
};


void compliance_mgr_RuleDescriptor_free(compliance_mgr_RuleDescriptor_t *in);

Dictionaries
Dictionary { string : opaque }

typedef struct base_rad_dict
compliance_mgr__rad_dict_string_opaque_t;

Dictionary { string : string }

typedef struct base_rad_dict
compliance_mgr__rad_dict_string_string_t;

Description

COMPLIANCE_MGR-1(3rad)      RAD Module Definitions      COMPLIANCE_MGR-1(3rad)



NAME
       compliance_mgr - Solaris Compliance

SYNOPSIS
       #include <rad/client/1/compliance_mgr.h>
       cc [ flag... ] file... -lcompliance_mgr1_client [ library... ]

   interface Assessment
       const char * uuid ; (ro)
       const compliance_mgr__rad_dict_string_opaque_t * contents ; (rw)
       const compliance_mgr__rad_dict_string_string_t * metadata ; (ro)
       compliance_mgr_AssessmentStatus_t state ; (rw)

       rc_err_t compliance_mgr_Assessment__rad_create(rc_instance_t *inst,
                                                      const char *uuid,
                                                      const char *name,
                                                      const char *benchmark,
                                                      const char *profile,
                                                      const char *tailoring,
                                                      const char *match,
                                                      const char *store,
                                                      rc_instance_t **result,
                                                      compliance_mgr_CMError_t **error);

       rc_err_t compliance_mgr_Assessment__rad_delete(rc_instance_t *inst,
                                                      compliance_mgr_CMError_t **error);

       typedef void (*compliance_mgr_Assessment_AssessmentProgress_cb_f)(rc_instance_t *inst,
                                                                         compliance_mgr_AssessmentProgress_t *payload,
                                                                         struct timespec ts,
                                                                         void *arg);

       rc_err_t compliance_mgr_Assessment_subscribe_AssessmentProgress(rc_instance_t *inst,
                                                                       compliance_mgr_Assessment_AssessmentProgress_cb_f cb,
                                                                       void *arg);

       rc_err_t compliance_mgr_Assessment_unsubscribe_AssessmentProgress(rc_instance_t *inst,
                                                                         void **arg);

   interface Benchmark
       const char * name ; (ro)
       const char * title ; (ro)
       const char ** profiles ; (ro)

       rc_err_t compliance_mgr_Benchmark_get_descriptions(rc_instance_t *inst,
                                                          const char *tailoring,
                                                          compliance_mgr_RuleDescriptor_t ***result,
                                                          int *result_cnt,
                                                          compliance_mgr_CMError_t **error);

   interface Tailoring
       const char * name ; (ro)

   Enumerated Types
       enum CMRetErrCode

           typedef enum compliance_mgr_CMRetErrCode {
                CMCMREC_CMRE_OK = 0,
                CMCMREC_CMRE_GENERAL_ERROR = 1,
                CMCMREC_CMRE_BAD_ARGS = 2,
                CMCMREC_CMRE_PARTIAL_SUCCESS = 3,
                CMCMREC_CMRE_EXISTS = 4,
                CMCMREC_CMRE_BUSY = 5,
                CMCMREC_CMRE_ACCESS = 6,
                CMCMREC_CMRE_UNANTICIPATED = 99,
           } compliance_mgr_CMRetErrCode_t;

       enum AssessmentStatus

           typedef enum compliance_mgr_AssessmentStatus {
                CMAS_AS_CREATING = 0,
                CMAS_AS_RUNNING = 1,
                CMAS_AS_COMPLETE = 2,
                CMAS_AS_ERROR = 3,
                CMAS_AS_ABORT = 4,
           } compliance_mgr_AssessmentStatus_t;

   Structured Types
       struct CMError

           typedef struct compliance_mgr_CMError compliance_mgr_CMError_t;

           struct compliance_mgr_CMError {
                compliance_mgr_CMRetErrCode_t cmcme_error_code;
                char *cmcme_error_message;
           };


           void compliance_mgr_CMError_free(compliance_mgr_CMError_t *in);

       struct AssessmentProgress

           typedef struct compliance_mgr_AssessmentProgress
           compliance_mgr_AssessmentProgress_t;

           struct compliance_mgr_AssessmentProgress {
                compliance_mgr_AssessmentStatus_t cmap_state;
                char *cmap_message;
                compliance_mgr_CMRetErrCode_t cmap_err_code;
           };


           void compliance_mgr_AssessmentProgress_free(compliance_mgr_AssessmentProgress_t *in);

       struct RuleDescriptor

           typedef struct compliance_mgr_RuleDescriptor
           compliance_mgr_RuleDescriptor_t;

           struct compliance_mgr_RuleDescriptor {
                char *cmrd_ruleid;
                char *cmrd_title;
                char *cmrd_description;
           };


           void compliance_mgr_RuleDescriptor_free(compliance_mgr_RuleDescriptor_t *in);

   Dictionaries
       Dictionary { string : opaque }

           typedef struct base_rad_dict
           compliance_mgr__rad_dict_string_opaque_t;

       Dictionary { string : string }

           typedef struct base_rad_dict
           compliance_mgr__rad_dict_string_string_t;

DESCRIPTION
       API com.oracle.solaris.rad.compliance_mgr [1]

       This API provides functionality for the administering compliance
       operations. At present, the API supports running assessments remotely,
       retrieving information about benchmarks and tailorings, and accepting
       assessments to be stored in the slave assessment store.

INTERFACES
   interface Assessment
       An interface describing an assessment.

       There is one key: 'uuid', the unique identifier.

       Note that if the user lacks access rights to the assessments store, a
       rad.client.PrivError exception can be raised for invocations of the
       Assessment create_object(), list_objects(), and get_object()
       interfaces.

       Assessment Properties
           const char * uuid (read-only) -- UUID of the assessment

               rc_err_t compliance_mgr_Assessment_get_uuid(rc_instance_t *inst,
                                                           char **result);

                   Get property value.

                   Arguments:

                   inst -- RAD instance

                   result -- Property value returned

           const compliance_mgr__rad_dict_string_opaque_t * contents
           (read-write)

               Contents of the assessment (assessment results file, report
               file, and log file). A fetch of the contents property retrieves
               all available content.

               rc_err_t compliance_mgr_Assessment_get_contents(rc_instance_t *inst,
                                                               compliance_mgr__rad_dict_string_opaque_t **result,
                                                               compliance_mgr_CMError_t **error);

                   Get property value.

                   Arguments:

                   inst -- RAD instance

                   result -- Property value returned

                   error

               rc_err_t compliance_mgr_Assessment_set_contents(rc_instance_t *inst,
                                                               const compliance_mgr__rad_dict_string_opaque_t *contents,
                                                               compliance_mgr_CMError_t **error);

                   Set property value.

                   Arguments:

                   inst -- RAD instance

                   contents -- Property value written

                   error

               Read-Write Error: compliance_mgr_CMError_t **

           const compliance_mgr__rad_dict_string_string_t * metadata
           (read-only) -- Metadata on the assessment. A fetch of the metadata
           property retrieves the match keys and values associated with the
           assessment.

               rc_err_t compliance_mgr_Assessment_get_metadata(rc_instance_t *inst,
                                                               compliance_mgr__rad_dict_string_string_t **result,
                                                               compliance_mgr_CMError_t **error);

                   Get property value.

                   Arguments:

                   inst -- RAD instance

                   result -- Property value returned

                   error

               Read Error: compliance_mgr_CMError_t **

           compliance_mgr_AssessmentStatus_t state (read-write)

               State of the assessment. At creation, the state is AS_CREATING.
               After updating the contents, the state will reflect the newly
               stored assessment contents.

               rc_err_t compliance_mgr_Assessment_get_state(rc_instance_t *inst,
                                                            compliance_mgr_AssessmentStatus_t *result,
                                                            compliance_mgr_CMError_t **error);

                   Get property value.

                   Arguments:

                   inst -- RAD instance

                   result -- Property value returned

                   error

               rc_err_t compliance_mgr_Assessment_set_state(rc_instance_t *inst,
                                                            compliance_mgr_AssessmentStatus_t state,
                                                            compliance_mgr_CMError_t **error);

                   Set property value.

                   Arguments:

                   inst -- RAD instance

                   state -- Property value written

                   error

               Read-Write Error: compliance_mgr_CMError_t **

       Assessment Create
           rc_err_t compliance_mgr_Assessment__rad_create(rc_instance_t *inst,
                                                          const char *uuid,
                                                          const char *name,
                                                          const char *benchmark,
                                                          const char *profile,
                                                          const char *tailoring,
                                                          const char *match,
                                                          const char *store,
                                                          rc_instance_t **result,
                                                          compliance_mgr_CMError_t **error);

               Create an assessment object instance.

               Constructor of new assessment. Accessed through the
               RADConnection.create_object(...) method.

               The following example will create a new assessment object. This
               object can have contents supplied by direct assignment.

               The following example creates a new assessment object using
               various properties of the assignment such as benchmark,
               profile, etc. The create_object() interface returns an
               Assessment object handle. Setting the 'state' property
               initiates the actual execution of the assessment. Subscription
               of events is done on the object being created so that the
               actual assessment execution can be observed via event
               notification.

               Arguments:

               inst -- RAD instance

               uuid (nullable) -- UUID of the new assessment.

               name (nullable) -- name of the new assessment, which can be
               specified by user.

               benchmark (nullable) -- name of the benchmark used to create an
               assessment.

               profile (nullable) -- name of the profile used to create an
               assessment.

               tailoring (nullable) -- name of the tailoring used to create an
               assessment.

               match (nullable) -- user specified match data for this
               assessment.

               store (nullable) -- user specified store_URI for this
               assessment. The assessment results will be pushed to an
               assessment store using the store_URI.

               result -- New Assessment instance

               error

                   This constructor will return an error immediately if it was
                   not possible to create the assessment, such as if an
                   assessment with the given uuid already existed or some
                   arguments fail to validate. In such a case no new
                   assessment is created.

       Assessment Retrieve
           rc_err_t compliance_mgr_Assessment__rad_get_name(adr_name_t **result,
                                                            int n,
                                                            ...);

               Obtain RAD name of a Assessment object.

               Arguments:

               result -- RAD name

               n -- Number of key-value pairs provided as variadic arguments

               ... -- Optional key-value pairs that compose the primary key

           rc_err_t compliance_mgr_Assessment__rad_lookup(rc_conn_t *c,
                                                          boolean_t strict,
                                                          rc_instance_t **result,
                                                          int n,
                                                          ...);

               Lookup a Assessment instance.

               Construct a RAD name for the interface based on the provided
               key-value pairs and perform a lookup. If successful, instance
               reference is returned in the result.

               Arguments:

               c -- RAD connection handle

               strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning

               result -- RAD instance

               n -- Number of key-value pairs provided as variadic arguments

               ... -- Optional key-value pairs that compose the primary key

           rc_err_t compliance_mgr_Assessment__rad_list(rc_conn_t *c,
                                                        boolean_t strict,
                                                        adr_pattern_scheme_t scheme,
                                                        adr_name_t ***result,
                                                        int *result_count,
                                                        int n,
                                                        ...);

               List RAD names of a available Assessment instances.

               Returns an array and array size of matching object names.

               Arguments:

               c -- RAD connection handle

               strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning

               scheme -- Apply glob (NS_GLOB) or regex (NS_REGEX) matching

               result -- Array of RAD names

               result_count -- Number of names in result array

               n -- Number of key-value pairs provided as variadic arguments

               ... -- Optional key-value pairs that compose the primary key

       Assessment Delete
           rc_err_t compliance_mgr_Assessment__rad_delete(rc_instance_t *inst,
                                                          compliance_mgr_CMError_t **error);

               Delete an assessment object instance.

               Assessment destructor to delete a particular assessment (one
               which this particular instance represents) from the store. The
               following example illustrates deletion of all assessments from
               the store:

               Arguments:

               inst -- RAD instance

               error -- This interface can return an error if the object
               instance can not be deleted, e.g. the assessment is still being
               created or updated.

       Assessment Events
           AssessmentProgress -- Event that is dispatched during an
           assessment.

               typedef void (*compliance_mgr_Assessment_AssessmentProgress_cb_f)(rc_instance_t *inst,
                                                                                 compliance_mgr_AssessmentProgress_t *payload,
                                                                                 struct timespec ts,
                                                                                 void *arg);

                   Function invoked when event "AssessmentProgress" occurs.

                   Arguments:

                   inst -- RAD instance that generated the event

                   payload -- Event payload

                   ts -- Time stamp

                   arg -- User data: custom parameter to invoke the function
                   with

               rc_err_t compliance_mgr_Assessment_subscribe_AssessmentProgress(rc_instance_t *inst,
                                                                               compliance_mgr_Assessment_AssessmentProgress_cb_f cb,
                                                                               void *arg);

                   Subscribe to event "AssessmentProgress".

                   Arguments:

                   inst -- RAD instance

                   cb -- Event callback function

                   arg -- User data: custom parameter to invoke the function
                   with

               rc_err_t compliance_mgr_Assessment_unsubscribe_AssessmentProgress(rc_instance_t *inst,
                                                                                 void **arg);

                   Unsubscribe from event "AssessmentProgress".

                   Arguments:

                   inst -- RAD instance

                   arg -- User data returned

   interface Benchmark
       An interface describing a benchmark.

       There is one key: 'name', the benchmark name.

       The following example shows how to use the Benchmark interface to get a
       list of benchmark objects and the properties of the project.

       Benchmark Properties
           const char * name (read-only)

               rc_err_t compliance_mgr_Benchmark_get_name(rc_instance_t *inst,
                                                          char **result);

                   Get property value.

                   Arguments:

                   inst -- RAD instance

                   result -- Property value returned

           const char * title (read-only)

               rc_err_t compliance_mgr_Benchmark_get_title(rc_instance_t *inst,
                                                           char **result);

                   Get property value.

                   Arguments:

                   inst -- RAD instance

                   result -- Property value returned

           const char ** profiles (read-only, nullable)

               rc_err_t compliance_mgr_Benchmark_get_profiles(rc_instance_t *inst,
                                                              char ***result,
                                                              int *result_cnt);

                   Get property value.

                   Arguments:

                   inst -- RAD instance

                   result -- Property value returned

                   result_cnt -- Number of items in result array

       Benchmark Methods
           rc_err_t compliance_mgr_Benchmark_get_descriptions(rc_instance_t *inst,
                                                              const char *tailoring,
                                                              compliance_mgr_RuleDescriptor_t ***result,
                                                              int *result_cnt,
                                                              compliance_mgr_CMError_t **error);

               Get property value.

               Arguments:

               inst -- RAD instance

               tailoring -- The name of the tailoring (if any) to use when
               constructing descriptions, replacing any default OSCV-xxx
               values defined by the benchmark with any matching tailored
               values from this tailoring. Passing an empty string implies no
               tailoring is needed.

               result -- A list of the rules this benchmark contains.

               result_cnt -- Number of items in result array

               error

       Benchmark Retrieve
           rc_err_t compliance_mgr_Benchmark__rad_get_name(adr_name_t **result,
                                                           int n,
                                                           ...);

               Obtain RAD name of a Benchmark object.

               Arguments:

               result -- RAD name

               n -- Number of key-value pairs provided as variadic arguments

               ... -- Optional key-value pairs that compose the primary key

           rc_err_t compliance_mgr_Benchmark__rad_lookup(rc_conn_t *c,
                                                         boolean_t strict,
                                                         rc_instance_t **result,
                                                         int n,
                                                         ...);

               Lookup a Benchmark instance.

               Construct a RAD name for the interface based on the provided
               key-value pairs and perform a lookup. If successful, instance
               reference is returned in the result.

               Arguments:

               c -- RAD connection handle

               strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning

               result -- RAD instance

               n -- Number of key-value pairs provided as variadic arguments

               ... -- Optional key-value pairs that compose the primary key

           rc_err_t compliance_mgr_Benchmark__rad_list(rc_conn_t *c,
                                                       boolean_t strict,
                                                       adr_pattern_scheme_t scheme,
                                                       adr_name_t ***result,
                                                       int *result_count,
                                                       int n,
                                                       ...);

               List RAD names of a available Benchmark instances.

               Returns an array and array size of matching object names.

               Arguments:

               c -- RAD connection handle

               strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning

               scheme -- Apply glob (NS_GLOB) or regex (NS_REGEX) matching

               result -- Array of RAD names

               result_count -- Number of names in result array

               n -- Number of key-value pairs provided as variadic arguments

               ... -- Optional key-value pairs that compose the primary key

   interface Tailoring
       An interface describing a tailoring.

       There is one key: 'name', the tailoring name.

       The following example shows how to use the Tailoring interface to get a
       known tailoring name. Note: to get installed tailorings, the tailoring
       name should have the form mybench/mytailoring.

       Tailoring Properties
           const char * name (read-only)

               rc_err_t compliance_mgr_Tailoring_get_name(rc_instance_t *inst,
                                                          char **result);

                   Get property value.

                   Arguments:

                   inst -- RAD instance

                   result -- Property value returned

       Tailoring Retrieve
           rc_err_t compliance_mgr_Tailoring__rad_get_name(adr_name_t **result,
                                                           int n,
                                                           ...);

               Obtain RAD name of a Tailoring object.

               Arguments:

               result -- RAD name

               n -- Number of key-value pairs provided as variadic arguments

               ... -- Optional key-value pairs that compose the primary key

           rc_err_t compliance_mgr_Tailoring__rad_lookup(rc_conn_t *c,
                                                         boolean_t strict,
                                                         rc_instance_t **result,
                                                         int n,
                                                         ...);

               Lookup a Tailoring instance.

               Construct a RAD name for the interface based on the provided
               key-value pairs and perform a lookup. If successful, instance
               reference is returned in the result.

               Arguments:

               c -- RAD connection handle

               strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning

               result -- RAD instance

               n -- Number of key-value pairs provided as variadic arguments

               ... -- Optional key-value pairs that compose the primary key

           rc_err_t compliance_mgr_Tailoring__rad_list(rc_conn_t *c,
                                                       boolean_t strict,
                                                       adr_pattern_scheme_t scheme,
                                                       adr_name_t ***result,
                                                       int *result_count,
                                                       int n,
                                                       ...);

               List RAD names of a available Tailoring instances.

               Returns an array and array size of matching object names.

               Arguments:

               c -- RAD connection handle

               strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning

               scheme -- Apply glob (NS_GLOB) or regex (NS_REGEX) matching

               result -- Array of RAD names

               result_count -- Number of names in result array

               n -- Number of key-value pairs provided as variadic arguments

               ... -- Optional key-value pairs that compose the primary key

ENUMERATED TYPES
       enum CMRetErrCode -- This enum contains a list of codes for
       compliance_mgr operation return or error.

           typedef enum compliance_mgr_CMRetErrCode {
                CMCMREC_CMRE_OK = 0,
                CMCMREC_CMRE_GENERAL_ERROR = 1,
                CMCMREC_CMRE_BAD_ARGS = 2,
                CMCMREC_CMRE_PARTIAL_SUCCESS = 3,
                CMCMREC_CMRE_EXISTS = 4,
                CMCMREC_CMRE_BUSY = 5,
                CMCMREC_CMRE_ACCESS = 6,
                CMCMREC_CMRE_UNANTICIPATED = 99,
           } compliance_mgr_CMRetErrCode_t;

           CMCMREC_CMRE_OK (0) -- Operation succeeded.

           CMCMREC_CMRE_GENERAL_ERROR (1) -- General error.

           CMCMREC_CMRE_BAD_ARGS (2) -- Argument usage error.

           CMCMREC_CMRE_PARTIAL_SUCCESS (3) -- Multiple operations were
           requested, but not all succeeded.

           CMCMREC_CMRE_EXISTS (4) -- Object to be created already exists.

           CMCMREC_CMRE_BUSY (5) -- Object cannot be updated or removed now.

           CMCMREC_CMRE_ACCESS (6) -- Insufficient privileges to access the
           object.

           CMCMREC_CMRE_UNANTICIPATED (99) -- An unanticipated error occurred.

       enum AssessmentStatus -- Different states of an Assessment

           typedef enum compliance_mgr_AssessmentStatus {
                CMAS_AS_CREATING = 0,
                CMAS_AS_RUNNING = 1,
                CMAS_AS_COMPLETE = 2,
                CMAS_AS_ERROR = 3,
                CMAS_AS_ABORT = 4,
           } compliance_mgr_AssessmentStatus_t;

           CMAS_AS_CREATING (0)

               CREATING is an interim state, indicating either an assessment
               is being pushed from a remote node or is being prepared for
               running on local node.

           CMAS_AS_RUNNING (1) -- RUNNING state indicates that an assessment
           is underway, or that the node was unable to complete the assessment
           run and publish results.

           CMAS_AS_COMPLETE (2) -- COMPLETE state indicates that the
           assessment ran to completion, and that a results.xccdf.xml file was
           generated.

           CMAS_AS_ERROR (3) -- ERROR state indicates that the underlying
           'oscap' command has terminated without producing a results file.

           CMAS_AS_ABORT (4)

               ABORT state indicates that the underlying 'oscap' command was
               terminated by a signal, for example, a keyboard interrupt
               during a synchronous assessment.

STRUCTURED TYPES
       struct CMError -- This struct is used as a general error payload for
       compliance_mgr-related methods.

           typedef struct compliance_mgr_CMError compliance_mgr_CMError_t;

           struct compliance_mgr_CMError {
                compliance_mgr_CMRetErrCode_t cmcme_error_code;
                char *cmcme_error_message;
           };


           void compliance_mgr_CMError_free(compliance_mgr_CMError_t *in);

           Fields:

           cmcme_error_code -- Error code.

               Current possible values are listed in CMRetErrCode enum but
               would not include value CMRE_OK.

           cmcme_error_message -- Error message.

       struct AssessmentProgress -- Event that is dispatched during assessment
       on a local system. It is a way of showing the assessment is making
       progress.

           typedef struct compliance_mgr_AssessmentProgress
           compliance_mgr_AssessmentProgress_t;

           struct compliance_mgr_AssessmentProgress {
                compliance_mgr_AssessmentStatus_t cmap_state;
                char *cmap_message;
                compliance_mgr_CMRetErrCode_t cmap_err_code;
           };


           void compliance_mgr_AssessmentProgress_free(compliance_mgr_AssessmentProgress_t *in);

           Fields:

           cmap_state -- State of the assessment.

           cmap_message -- The progress message, e.g. the assessment check
           that is being perform.

           cmap_err_code -- Error that caused assessment to fail.

       struct RuleDescriptor -- Describe a rule, providing access to its
       identifier string, its title and its description.

           typedef struct compliance_mgr_RuleDescriptor
           compliance_mgr_RuleDescriptor_t;

           struct compliance_mgr_RuleDescriptor {
                char *cmrd_ruleid;
                char *cmrd_title;
                char *cmrd_description;
           };


           void compliance_mgr_RuleDescriptor_free(compliance_mgr_RuleDescriptor_t *in);

           Fields:

           cmrd_ruleid -- The XCCDF identifier of the rule. (e.g. OSC-12345)

           cmrd_title -- The title of the rule.

           cmrd_description -- The description of the rule. This is formatted
           "as is" from the source xccdf file, and may not suit all screen
           layouts.

DICTIONARIES
   Dictionary { string : opaque }
       Dictionary with a key type of string and a value type of opaque.

       typedef struct base_rad_dict compliance_mgr__rad_dict_string_opaque_t;

       rc_err_t compliance_mgr__rad_dict_string_opaque_get(compliance_mgr__rad_dict_string_opaque_t *dict,
                                                           const char *key,
                                                           rc_opaque_t **result);

           Get the value for given key.

           Arguments:

           dict -- Dictionary

           key -- Key value

           result -- Value returned

       rc_err_t compliance_mgr__rad_dict_string_opaque_put(compliance_mgr__rad_dict_string_opaque_t *dict,
                                                           const char *key,
                                                           const rc_opaque_t *value,
                                                           rc_opaque_t **result);

           Put a key-value pair into the dictionary.

           Returns a previous value stored with the same key if one exists.

           Arguments:

           dict -- Dictionary

           key -- Key value

           value -- Value written

           result -- Original value for the key

       rc_err_t compliance_mgr__rad_dict_string_opaque_contains(compliance_mgr__rad_dict_string_opaque_t *dict,
                                                                const char *key);

           Check whether a key exists in the dictionary.

           Returns RCE_OK when key exists, RCE_CLIENT_NOTFOUND otherwise.

           Arguments:

           dict -- Dictionary

           key -- Key value

       rc_err_t compliance_mgr__rad_dict_string_opaque_remove(compliance_mgr__rad_dict_string_opaque_t *dict,
                                                              const char *key,
                                                              rc_opaque_t **result);

           Remove key-value pair from the dictionary.

           Returns RCE_OK when key was sucessfully removed,
           RCE_CLIENT_NOTFOUND otherwise.

           Arguments:

           dict -- Dictionary

           key -- Key value

           result -- Original value for the key

       rc_err_t compliance_mgr__rad_dict_string_opaque_keys(compliance_mgr__rad_dict_string_opaque_t *dict,
                                                            char ***result,
                                                            int *count);

           Get list of keys from the dictionary.

           Memory associated with the result array should be freed by the
           user.

           Arguments:

           dict -- Dictionary

           result -- Array of dictionary keys

           count -- Number of items in result array

       rc_err_t compliance_mgr__rad_dict_string_opaque_values(compliance_mgr__rad_dict_string_opaque_t *dict,
                                                              rc_opaque_t ***result,
                                                              int *count);

           Get list of values from the dictionary.

           Memory associated with the result array should be freed by the
           user.

           Arguments:

           dict -- Dictionary

           result -- Array of dictionary values

           count -- Number of items in result array

       unsigned int compliance_mgr__rad_dict_string_opaque_size(compliance_mgr__rad_dict_string_opaque_t *dict);

           Get number of key-value pairs in the dictionary.

           Arguments:

           dict -- Dictionary

       compliance_mgr__rad_dict_string_opaque_t * compliance_mgr__rad_dict_string_opaque_create(const rc_instance_t *inst);

           Create a new, empty dictionary.

           Returns a pointer to the dictionary, or NULL on error.

           Arguments:

           inst -- RAD instance

       void compliance_mgr__rad_dict_string_opaque_free(compliance_mgr__rad_dict_string_opaque_t *dict);

           Destroy the dictionary and release the allocated memory.

           Arguments:

           dict -- Dictionary

       rc_err_t compliance_mgr__rad_dict_string_opaque_map(compliance_mgr__rad_dict_string_opaque_t *dict,
                                                           rc_err_t(*func)(const char *, const rc_opaque_t *, void *),
                                                           void *arg);

           Invoke a function with each key-value pair in the dictionary.

           Arguments:

           dict -- Dictionary

           func -- Function to invoke

               The arguments are: key, value, user-data.

           arg -- User data: custom parameter to invoke the function with

   Dictionary { string : string }
       Dictionary with a key type of string and a value type of string.

       typedef struct base_rad_dict compliance_mgr__rad_dict_string_string_t;

       rc_err_t compliance_mgr__rad_dict_string_string_get(compliance_mgr__rad_dict_string_string_t *dict,
                                                           const char *key,
                                                           char **result);

           Get the value for given key.

           Arguments:

           dict -- Dictionary

           key -- Key value

           result -- Value returned

       rc_err_t compliance_mgr__rad_dict_string_string_put(compliance_mgr__rad_dict_string_string_t *dict,
                                                           const char *key,
                                                           const char *value,
                                                           char **result);

           Put a key-value pair into the dictionary.

           Returns a previous value stored with the same key if one exists.

           Arguments:

           dict -- Dictionary

           key -- Key value

           value -- Value written

           result -- Original value for the key

       rc_err_t compliance_mgr__rad_dict_string_string_contains(compliance_mgr__rad_dict_string_string_t *dict,
                                                                const char *key);

           Check whether a key exists in the dictionary.

           Returns RCE_OK when key exists, RCE_CLIENT_NOTFOUND otherwise.

           Arguments:

           dict -- Dictionary

           key -- Key value

       rc_err_t compliance_mgr__rad_dict_string_string_remove(compliance_mgr__rad_dict_string_string_t *dict,
                                                              const char *key,
                                                              char **result);

           Remove key-value pair from the dictionary.

           Returns RCE_OK when key was sucessfully removed,
           RCE_CLIENT_NOTFOUND otherwise.

           Arguments:

           dict -- Dictionary

           key -- Key value

           result -- Original value for the key

       rc_err_t compliance_mgr__rad_dict_string_string_keys(compliance_mgr__rad_dict_string_string_t *dict,
                                                            char ***result,
                                                            int *count);

           Get list of keys from the dictionary.

           Memory associated with the result array should be freed by the
           user.

           Arguments:

           dict -- Dictionary

           result -- Array of dictionary keys

           count -- Number of items in result array

       rc_err_t compliance_mgr__rad_dict_string_string_values(compliance_mgr__rad_dict_string_string_t *dict,
                                                              char ***result,
                                                              int *count);

           Get list of values from the dictionary.

           Memory associated with the result array should be freed by the
           user.

           Arguments:

           dict -- Dictionary

           result -- Array of dictionary values

           count -- Number of items in result array

       unsigned int compliance_mgr__rad_dict_string_string_size(compliance_mgr__rad_dict_string_string_t *dict);

           Get number of key-value pairs in the dictionary.

           Arguments:

           dict -- Dictionary

       compliance_mgr__rad_dict_string_string_t * compliance_mgr__rad_dict_string_string_create(const rc_instance_t *inst);

           Create a new, empty dictionary.

           Returns a pointer to the dictionary, or NULL on error.

           Arguments:

           inst -- RAD instance

       void compliance_mgr__rad_dict_string_string_free(compliance_mgr__rad_dict_string_string_t *dict);

           Destroy the dictionary and release the allocated memory.

           Arguments:

           dict -- Dictionary

       rc_err_t compliance_mgr__rad_dict_string_string_map(compliance_mgr__rad_dict_string_string_t *dict,
                                                           rc_err_t(*func)(const char *, const char *, void *),
                                                           void *arg);

           Invoke a function with each key-value pair in the dictionary.

           Arguments:

           dict -- Dictionary

           func -- Function to invoke

               The arguments are: key, value, user-data.

           arg -- User data: custom parameter to invoke the function with

VERSION
       1.0

ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:

       +--------------------+---------------------------------------------+
       |  ATTRIBUTE TYPE    |               ATTRIBUTE VALUE               |
       +--------------------+---------------------------------------------+
       |Availability        | system/management/rad/module/rad-compliance |
       +--------------------+---------------------------------------------+
       |Interface Stability | Private                                     |
       +--------------------+---------------------------------------------+

SEE ALSO
       rad(8)

NOTES
        1. Accessing Python documentation for this module:

           $ pydoc rad.bindings.com.oracle.solaris.rad.compliance_mgr_1





Solaris 11.4                      2018-03-21            COMPLIANCE_MGR-1(3rad)