Data Structures |
struct | xccdf_policy_model |
| XCCDF policy model structure contains xccdf_benchmark as reference to Benchmark element in XML file and list of policies that are abstract structure of Profile element from benchmark file. More...
|
struct | xccdf_policy |
| XCCDF policy structure is abstract (class) structure of Profile element from benchmark. More...
|
struct | xccdf_value_binding |
| XCCDF value binding structure is binding between Refine values, Set values, Value element and Check export element of benchmark. More...
|
struct | xccdf_policy_iterator |
| Iterate through policies. More...
|
Files |
file | xccdf_policy.h |
| Open-scap XCCDF Policy library interface.
|
Functions |
struct xccdf_policy_model * | xccdf_policy_model::xccdf_policy_model_new (struct xccdf_benchmark *benchmark) |
| Constructor of Policy Model structure.
|
struct xccdf_policy * | xccdf_policy::xccdf_policy_new (struct xccdf_policy_model *model, struct xccdf_profile *profile) |
| Constructor of Policy structure.
|
struct xccdf_value_binding * | xccdf_value_binding::xccdf_value_binding_new (void) |
| Constructor of structure with profile bindings - refine_rules, refine_values and set_values.
|
void | xccdf_policy_model::xccdf_policy_model_free (struct xccdf_policy_model *) |
| Destructor of Policy Model structure.
|
void | xccdf_policy::xccdf_policy_free (struct xccdf_policy *) |
| Destructor of Policy structure.
|
void | xccdf_value_binding::xccdf_value_binding_free (struct xccdf_value_binding *) |
| Destructor of Value binding structure.
|
void | xccdf_policy::xccdf_policy_export_variables (struct xccdf_policy *, char *export_namespace, const char *file) |
| Import/Export function Not yet implemented.
|
void | xccdf_policy::xccdf_policy_export_controls (struct xccdf_policy *, char *export_namespace, const char *file) |
| Import/Export function Not yet implemented.
|
void | xccdf_policy::xccdf_policy_import_results (struct xccdf_policy *, char *import_namespace, const char *file) |
| Import/Export function Not yet implemented.
|
void | xccdf_policy::xccdf_policy_export_results (struct xccdf_policy *, char *scoring_model_namespace, const char *file) |
| Import/Export function Not yet implemented.
|
bool | xccdf_policy_model::xccdf_policy_model_register_engine_callback (struct xccdf_policy_model *model, char *sys, void *func, void *usr) |
| Function to register callback for checking system For Python use xccdf_policy_model_register_engine_callback_py.
|
bool | xccdf_policy_model::xccdf_policy_model_register_output_callback (struct xccdf_policy_model *model, oscap_reporter func, void *usr) |
| Function to register output callback for checking system that will be called after each rule evaluation.
|
Getters |
Return value is pointer to structure's member.
Do not free unless you null the pointer in the structure. Use remove function otherwise.
|
struct xccdf_policy_model * | xccdf_policy::xccdf_policy_get_model (const struct xccdf_policy *policy) |
| Get model from Policy (parent structure of Policy to access the benchmark).
|
struct xccdf_benchmark * | xccdf_policy_model::xccdf_policy_model_get_benchmark (const struct xccdf_policy_model *item) |
| Get Benchmark from Policy Model.
|
struct
xccdf_value_binding_iterator * | xccdf_policy::xccdf_policy_get_values (const struct xccdf_policy *item) |
| Get Value Bindings from XCCDF Policy.
|
struct xccdf_policy_iterator * | xccdf_policy_model::xccdf_policy_model_get_policies (const struct xccdf_policy_model *model) |
| Get policies from Policy Model.
|
struct xccdf_select_iterator * | xccdf_policy::xccdf_policy_get_selected_rules (struct xccdf_policy *) |
| Get selected rules from policy.
|
struct xccdf_profile * | xccdf_policy::xccdf_policy_get_profile (const struct xccdf_policy *) |
| Get XCCDF Profile from Policy.
|
struct xccdf_select_iterator * | xccdf_policy::xccdf_policy_get_rules (const struct xccdf_policy *) |
| Get rules from Policy.
|
char * | xccdf_value_binding::xccdf_value_binding_get_name (const struct xccdf_value_binding *) |
| Get variable name from value bindings.
|
char * | xccdf_value_binding::xccdf_value_binding_get_value (const struct xccdf_value_binding *) |
| Get value from value bindings.
|
xccdf_value_type_t | xccdf_value_binding::xccdf_value_binding_get_type (const struct xccdf_value_binding *) |
| get variable type from value bindings
|
xccdf_operator_t | xccdf_value_binding::xccdf_value_binding_get_operator (const struct xccdf_value_binding *) |
| get Value operator from value bindings
|
char * | xccdf_value_binding::xccdf_value_binding_get_setvalue (const struct xccdf_value_binding *) |
| get Set Value from value bindings
|
struct xccdf_result_iterator * | xccdf_policy_model::xccdf_policy_get_results (const struct xccdf_policy *policy) |
| Get results of all XCCDF Policy results.
|
struct xccdf_result * | xccdf_policy_model::xccdf_policy_get_result_by_id (struct xccdf_policy *policy, const char *id) |
| Get XCCDF Result structure by it's idetificator if there is one.
|
const char * | xccdf_policy::xccdf_policy_get_id (struct xccdf_policy *policy) |
| Get ID of XCCDF Profile that is implemented by XCCDF Policy.
|
struct xccdf_policy * | xccdf_policy_model::xccdf_policy_model_get_policy_by_id (struct xccdf_policy_model *policy_model, const char *id) |
| Get XCCDF Policy from Policy model by speciefied ID of Profile.
|
Setters |
For lists use add functions.
Parameters of set functions are duplicated in memory and need to be freed by caller.
|
bool | xccdf_policy_model::xccdf_policy_model_add_policy (struct xccdf_policy_model *, struct xccdf_policy *) |
| Add Policy to Policy Model.
|
bool | xccdf_policy::xccdf_policy_add_rule (struct xccdf_policy *, struct xccdf_select *) |
| Add rule to Policy.
|
bool | xccdf_policy::xccdf_policy_set_selected (struct xccdf_policy *policy, char *idref) |
| Set a new selector to the Policy structure.
|
bool | xccdf_policy_model::xccdf_policy_add_result (struct xccdf_policy *policy, struct xccdf_result *item) |
| Add result to XCCDF Policy Model.
|
bool | xccdf_policy::xccdf_policy_add_value (struct xccdf_policy *, struct xccdf_value_binding *) |
| Add value binding to the Policy structure.
|
Evaluators |
Add check export to the Value Binding structure
- Returns:
- true if rule has been added succesfully
|
struct xccdf_result * | xccdf_policy::xccdf_policy_evaluate (struct xccdf_policy *policy) |
| Call the checking engine for each selected rule in given policy structure.
|
bool | xccdf_policy::xccdf_policy_resolve (struct xccdf_policy *policy) |
| Resolve benchmark by applying all refine_rules and refine_values to rules / values of benchmark.
|
Iterators |
|
bool | xccdf_policy_iterator::xccdf_policy_iterator_has_more (struct xccdf_policy_iterator *it) |
| Return true if the list is not empty, false otherwise.
|
struct xccdf_policy * | xccdf_policy_iterator::xccdf_policy_iterator_next (struct xccdf_policy_iterator *it) |
| Return the next xccdf_policy structure from the list and increment the iterator.
|
void | xccdf_policy_iterator::xccdf_policy_iterator_free (struct xccdf_policy_iterator *it) |
| Free the iterator structure (it makes no changes to the list structure).
|
struct xccdf_score * | xccdf_value_binding::xccdf_policy_get_score (struct xccdf_policy *policy, struct xccdf_result *test_result, const char *system) |
| Get score of the XCCDF Benchmark.
|