XCCDF policy structure is abstract (class) structure of Profile element from benchmark. More...
#include <xccdf_policy.h>
Public Member Functions | |
struct xccdf_policy * | xccdf_policy_new (struct xccdf_policy_model *model, struct xccdf_profile *profile) |
Constructor of Policy structure. | |
void | xccdf_policy_free (struct xccdf_policy *) |
Destructor of Policy structure. | |
void | xccdf_policy_export_variables (struct xccdf_policy *, char *export_namespace, const char *file) |
Import/Export function Not yet implemented. | |
void | xccdf_policy_export_controls (struct xccdf_policy *, char *export_namespace, const char *file) |
Import/Export function Not yet implemented. | |
void | xccdf_policy_import_results (struct xccdf_policy *, char *import_namespace, const char *file) |
Import/Export function Not yet implemented. | |
void | xccdf_policy_export_results (struct xccdf_policy *, char *scoring_model_namespace, const char *file) |
Import/Export function Not yet implemented. | |
Getters | |
struct xccdf_policy_model * | xccdf_policy_get_model (const struct xccdf_policy *policy) |
Get model from Policy (parent structure of Policy to access the benchmark). | |
struct xccdf_value_binding_iterator * | xccdf_policy_get_values (const struct xccdf_policy *item) |
Get Value Bindings from XCCDF Policy. | |
struct xccdf_select_iterator * | xccdf_policy_get_selected_rules (struct xccdf_policy *) |
Get selected rules from policy. | |
struct xccdf_profile * | xccdf_policy_get_profile (const struct xccdf_policy *) |
Get XCCDF Profile from Policy. | |
struct xccdf_select_iterator * | xccdf_policy_get_rules (const struct xccdf_policy *) |
Get rules from Policy. | |
const char * | xccdf_policy_get_id (struct xccdf_policy *policy) |
Get ID of XCCDF Profile that is implemented by XCCDF Policy. | |
Setters | |
bool | xccdf_policy_add_rule (struct xccdf_policy *, struct xccdf_select *) |
Add rule to Policy. | |
bool | xccdf_policy_set_selected (struct xccdf_policy *policy, char *idref) |
Set a new selector to the Policy structure. | |
bool | xccdf_policy_add_value (struct xccdf_policy *, struct xccdf_value_binding *) |
Add value binding to the Policy structure. | |
Evaluators | |
struct xccdf_result * | xccdf_policy_evaluate (struct xccdf_policy *policy) |
Call the checking engine for each selected rule in given policy structure. | |
bool | xccdf_policy_resolve (struct xccdf_policy *policy) |
Resolve benchmark by applying all refine_rules and refine_values to rules / values of benchmark. | |
Data Fields | |
struct xccdf_policy_model * | model |
XCCDF Policy model. | |
struct xccdf_profile * | profile |
Profile structure (from benchmark). | |
struct oscap_list * | rules |
Selected rules of profile. | |
struct oscap_list * | values |
Bound values of profile. | |
struct oscap_list * | results |
List of XCCDF results. |
XCCDF policy structure is abstract (class) structure of Profile element from benchmark.
Policy structure that abstract benchmark's profile.
Structure contains rules and bound values to abstract these lists from the benchmark file. Can be modified temporaly so changes can be discarded or saved to the existing model.