Open SCAP Library
xccdf_policy.h
Go to the documentation of this file.
1 /*
2  * Copyright 2009--2014 Red Hat Inc., Durham, North Carolina.
3  * All Rights Reserved.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  */
20 
21 
31 #ifndef XCCDF_POLICY_H_
32 #define XCCDF_POLICY_H_
33 
34 #include <xccdf_benchmark.h>
35 #include <stdbool.h>
36 #include <time.h>
37 #include <oscap.h>
38 #include "oscap_export.h"
39 #include "oval_definitions.h"
40 
45 struct xccdf_policy_model;
46 
51 struct xccdf_policy;
52 
57 struct xccdf_value_binding;
58 
59 struct xccdf_value_binding_iterator;
60 
67 
72 typedef enum {
73  POLICY_ENGINE_QUERY_NAMES_FOR_HREF = 1,
74  POLICY_ENGINE_QUERY_OVAL_DEFS_FOR_HREF = 2,
76 
93 typedef void *(*xccdf_policy_engine_query_fn) (void *, xccdf_policy_engine_query_t, void *);
94 
103 typedef xccdf_test_result_type_t (*xccdf_policy_engine_eval_fn) (struct xccdf_policy *policy, const char *rule_id, const char *definition_id, const char *href_if, struct xccdf_value_binding_iterator *value_binding_it, struct xccdf_check_import_iterator *check_imports_it, void *user_data);
104 
105 /************************************************************/
106 
117 
124 OSCAP_API struct xccdf_policy * xccdf_policy_new(struct xccdf_policy_model * model, struct xccdf_profile * profile);
125 
131 OSCAP_API struct xccdf_value_binding * xccdf_value_binding_new(void);
132 
137 OSCAP_API void xccdf_policy_model_free(struct xccdf_policy_model *);
138 
143 OSCAP_API void xccdf_policy_free(struct xccdf_policy *);
144 
149 OSCAP_API void xccdf_value_binding_free(struct xccdf_value_binding *);
150 
166 OSCAP_API bool xccdf_policy_model_set_tailoring(struct xccdf_policy_model *model, struct xccdf_tailoring *tailoring);
167 
173 
183 OSCAP_API char *xccdf_policy_get_readable_item_title(struct xccdf_policy *policy, struct xccdf_item *item, const char *preferred_lang);
184 
195 OSCAP_API char *xccdf_policy_get_readable_item_description(struct xccdf_policy *policy, struct xccdf_item *item, const char *preferred_lang);
196 
201 OSCAP_API bool xccdf_policy_model_add_cpe_dict_source(struct xccdf_policy_model * model, struct oscap_source *source);
202 
209 OSCAP_API bool xccdf_policy_model_add_cpe_dict(struct xccdf_policy_model * model, const char * cpe_dict);
210 
215 OSCAP_API bool xccdf_policy_model_add_cpe_lang_model_source(struct xccdf_policy_model * model, struct oscap_source *source);
216 
222 OSCAP_API bool xccdf_policy_model_add_cpe_autodetect_source(struct xccdf_policy_model *model, struct oscap_source *source);
223 
229 
241 
242 typedef int (*policy_reporter_output)(struct xccdf_rule_result *, void *);
243 
252 OSCAP_API bool xccdf_policy_model_register_output_callback(struct xccdf_policy_model * model, policy_reporter_output func, void * usr);
253 
254 typedef int (*policy_reporter_start)(struct xccdf_rule *, void *);
255 
264 OSCAP_API bool xccdf_policy_model_register_start_callback(struct xccdf_policy_model * model, policy_reporter_start func, void * usr);
265 
266 typedef int (*policy_reporter_multicheck)(struct oval_definition*, void *);
276 OSCAP_API bool xccdf_policy_model_register_multicheck_callback(struct xccdf_policy_model *model, policy_reporter_multicheck func, void *usr);
277 
278 /************************************************************/
292 OSCAP_API struct xccdf_policy_model * xccdf_policy_get_model(const struct xccdf_policy * policy);
293 
300 OSCAP_API struct xccdf_benchmark * xccdf_policy_model_get_benchmark(const struct xccdf_policy_model * item);
301 
306 OSCAP_API struct xccdf_value_binding_iterator * xccdf_policy_get_values(const struct xccdf_policy * item);
307 
315 OSCAP_API struct xccdf_policy_iterator * xccdf_policy_model_get_policies(const struct xccdf_policy_model *model);
316 
325 OSCAP_API int xccdf_policy_model_build_all_useful_policies(struct xccdf_policy_model *policy_model);
326 
334 
340 OSCAP_API struct xccdf_profile * xccdf_policy_get_profile(const struct xccdf_policy *);
341 
347 OSCAP_API struct xccdf_select_iterator * xccdf_policy_get_selects(const struct xccdf_policy *);
348 
354 OSCAP_API char * xccdf_value_binding_get_name(const struct xccdf_value_binding *);
355 
361 OSCAP_API char * xccdf_value_binding_get_value(const struct xccdf_value_binding *);
362 
369 
376 
382 OSCAP_API char * xccdf_value_binding_get_setvalue(const struct xccdf_value_binding *);
383 
388 OSCAP_API struct xccdf_result_iterator * xccdf_policy_get_results(const struct xccdf_policy * policy);
389 
395 OSCAP_API struct xccdf_result * xccdf_policy_get_result_by_id(struct xccdf_policy * policy, const char * id);
396 
403 OSCAP_API const char * xccdf_policy_get_id(struct xccdf_policy * policy);
404 
412 OSCAP_API struct xccdf_policy * xccdf_policy_model_get_policy_by_id(struct xccdf_policy_model * policy_model, const char * id);
413 
414 /************************************************************/
417 /************************************************************/
430 OSCAP_API bool xccdf_policy_model_add_policy(struct xccdf_policy_model *, struct xccdf_policy *);
431 
437 OSCAP_API bool xccdf_policy_add_select(struct xccdf_policy *, struct xccdf_select *);
438 
443 OSCAP_API bool xccdf_policy_add_result(struct xccdf_policy * policy, struct xccdf_result * item);
444 
450 OSCAP_API bool xccdf_policy_add_value(struct xccdf_policy *, struct xccdf_value_binding *);
451 
457 OSCAP_API bool xccdf_policy_is_item_selected(struct xccdf_policy *policy, const char *id);
458 
463 OSCAP_API int xccdf_policy_get_selected_rules_count(struct xccdf_policy *policy);
464 
470 OSCAP_API struct xccdf_select * xccdf_policy_get_select_by_id(struct xccdf_policy * policy, const char *item_id);
471 
472 /************************************************************/
475 /************************************************************/
499 OSCAP_API struct xccdf_result * xccdf_policy_evaluate(struct xccdf_policy * policy);
500 
509 OSCAP_API bool xccdf_policy_resolve(struct xccdf_policy * policy);
510 
521 OSCAP_API int xccdf_policy_generate_fix(struct xccdf_policy *policy, struct xccdf_result *result, const char *sys, int output_fd);
522 
526 struct oscap_file_entry;
527 
529 OSCAP_API struct oscap_file_entry *oscap_file_entry_new(void);
531 OSCAP_API struct oscap_file_entry *oscap_file_entry_dup(struct oscap_file_entry* file_entry);
533 OSCAP_API void oscap_file_entry_free(struct oscap_file_entry* entry);
535 OSCAP_API const char* oscap_file_entry_get_system(struct oscap_file_entry* entry);
537 OSCAP_API const char* oscap_file_entry_get_file(struct oscap_file_entry* entry);
538 
543 
552 
556 struct oscap_file_entry_list;
557 
559 OSCAP_API struct oscap_file_entry_list* oscap_file_entry_list_new(void);
561 OSCAP_API void oscap_file_entry_list_free(struct oscap_file_entry_list* list);
564 
574 
582 OSCAP_API struct oscap_file_entry_list * xccdf_item_get_systems_and_files(struct xccdf_item * item);
583 
589 OSCAP_API struct oscap_stringlist * xccdf_policy_model_get_files(struct xccdf_policy_model * policy_model);
590 
596 OSCAP_API struct oscap_stringlist * xccdf_item_get_files(struct xccdf_item * item);
597 
604 
605 /************************************************************/
608 /************************************************************/
618 OSCAP_API bool xccdf_policy_iterator_has_more(struct xccdf_policy_iterator *it);
619 
624 OSCAP_API struct xccdf_policy * xccdf_policy_iterator_next(struct xccdf_policy_iterator *it);
625 
630 OSCAP_API void xccdf_policy_iterator_free(struct xccdf_policy_iterator *it);
631 
636 OSCAP_API void xccdf_policy_iterator_reset(struct xccdf_policy_iterator *it);
637 
642 OSCAP_API bool xccdf_value_binding_iterator_has_more(struct xccdf_value_binding_iterator *it);
643 
648 OSCAP_API struct xccdf_value_binding * xccdf_value_binding_iterator_next(struct xccdf_value_binding_iterator *it);
649 
654 OSCAP_API void xccdf_value_binding_iterator_free(struct xccdf_value_binding_iterator *it);
655 
660 OSCAP_API void xccdf_value_binding_iterator_reset(struct xccdf_value_binding_iterator *it);
661 
669 OSCAP_API struct xccdf_score * xccdf_policy_get_score(struct xccdf_policy * policy, struct xccdf_result * test_result, const char * system);
670 
677 OSCAP_API int xccdf_policy_recalculate_score(struct xccdf_policy * policy, struct xccdf_result * test_result);
678 
687 OSCAP_API const char *xccdf_policy_get_value_of_item(struct xccdf_policy * policy, struct xccdf_item * item);
688 
694 OSCAP_API char* xccdf_policy_substitute(const char *text, struct xccdf_policy *policy);
695 
696 /************************************************************/
702 #endif
703 
704 
OSCAP_API struct xccdf_policy * 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.
Definition: xccdf_policy.c:1858
OSCAP_API struct oscap_stringlist * xccdf_item_get_files(struct xccdf_item *item)
Return names of files that are used in checks of particular rules.
Definition: xccdf_policy.c:1419
Stores content from xccdf:Tailoring element which can be loaded from a separate file.
Definition: item.h:171
OSCAP_API struct oscap_file_entry_list * xccdf_item_get_systems_and_files(struct xccdf_item *item)
Return names of files that are used in checks of particular rules.
Definition: xccdf_policy.c:1310
OSCAP_API bool xccdf_policy_model_register_engine_and_query_callback(struct xccdf_policy_model *model, char *sys, xccdf_policy_engine_eval_fn eval_fn, void *usr, xccdf_policy_engine_query_fn query_fn)
Function to register callback for checking system.
Definition: xccdf_policy.c:1562
OSCAP_API struct xccdf_policy * xccdf_policy_iterator_next(struct xccdf_policy_iterator *it)
Return the next xccdf_policy structure from the list and increment the iterator.
OSCAP_API struct xccdf_select * xccdf_policy_get_select_by_id(struct xccdf_policy *policy, const char *item_id)
Get select from policy by specified ID of XCCDF Item.
Definition: xccdf_policy.c:1841
OSCAP_API const char * oscap_file_entry_get_system(struct oscap_file_entry *entry)
Definition: xccdf_policy.c:1193
OSCAP_API int xccdf_policy_recalculate_score(struct xccdf_policy *policy, struct xccdf_result *test_result)
Recalculate score of the XCCDF Benchmark.
Definition: xccdf_policy.c:2084
Oval definition specification.
Definition: oval_definition.c:53
A collection of strings.
Definition: oscap_text.h:60
General OpenScap functions and types.
OSCAP_API bool xccdf_policy_model_add_cpe_dict_source(struct xccdf_policy_model *model, struct oscap_source *source)
Registers an additional CPE dictionary for applicability testing The one embedded in the evaluated XC...
Definition: xccdf_policy.c:1506
XCCDF score.
Definition: item.h:369
OSCAP_API bool xccdf_policy_add_value(struct xccdf_policy *, struct xccdf_value_binding *)
Add value binding to the Policy structure.
OSCAP_API int xccdf_policy_generate_fix(struct xccdf_policy *policy, struct xccdf_result *result, const char *sys, int output_fd)
Generate remediation prescription (presumably a remediation script).
Definition: xccdf_policy_remediate.c:1076
OSCAP_API struct xccdf_policy * xccdf_policy_new(struct xccdf_policy_model *model, struct xccdf_profile *profile)
Constructor of Policy structure.
Definition: xccdf_policy.c:1775
Iterate through policies.
Definition: xccdf_policy.h:59
Definition: list.c:548
xccdf_operator_t
Operator to be applied on an xccdf_value.
Definition: xccdf_benchmark.h:101
OSCAP_API 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)
OSCAP_API struct xccdf_select_iterator * xccdf_policy_get_selected_rules(struct xccdf_policy *)
Get selected rules from policy.
Definition: xccdf_policy.c:1848
OSCAP_API xccdf_operator_t xccdf_value_binding_get_operator(const struct xccdf_value_binding *)
get Value operator from value bindings
OSCAP_API char * xccdf_policy_substitute(const char *text, struct xccdf_policy *policy)
Perform textual substitution of cdf:sub elements with respect to given XCCDF policy.
Definition: xccdf_policy_substitute.c:210
Top level XCCDF structure containing profiles, rules, values and results.
XCCDF select option usen in the profile.
Definition: item.h:253
OSCAP_API struct oscap_file_entry * oscap_file_entry_new(void)
Definition: xccdf_policy.c:1169
OSCAP_API struct xccdf_score * xccdf_policy_get_score(struct xccdf_policy *policy, struct xccdf_result *test_result, const char *system)
Get score of the XCCDF Benchmark.
Definition: xccdf_policy.c:2078
OSCAP_API void xccdf_policy_free(struct xccdf_policy *)
Destructor of Policy structure.
Definition: xccdf_policy.c:2164
Check import iterator.
Definition: xccdf_benchmark.h:540
void *(* xccdf_policy_engine_query_fn)(void *, xccdf_policy_engine_query_t, void *)
Type of function which implements queries defined within xccdf_policy_engine_query_t.
Definition: xccdf_policy.h:93
OSCAP_API struct oscap_stringlist * xccdf_policy_model_get_files(struct xccdf_policy_model *policy_model)
Return names of files that are used in checks of particular rules.
Definition: xccdf_policy.c:2136
OSCAP_API void xccdf_policy_model_free(struct xccdf_policy_model *)
Destructor of Policy Model structure.
Definition: xccdf_policy.c:2151
Select iterator.
Definition: xccdf_benchmark.h:471
XCCDF policy model structure contains xccdf_benchmark as reference to Benchmark element in XML file a...
Definition: xccdf_policy_priv.h:38
OSCAP_API struct xccdf_select_iterator * xccdf_policy_get_selects(const struct xccdf_policy *)
Get rules from Policy.
OSCAP_API char * xccdf_policy_get_readable_item_description(struct xccdf_policy *policy, struct xccdf_item *item, const char *preferred_lang)
Get human readable description of given XCCDF Item.
Definition: xccdf_policy.c:145
OSCAP_API bool xccdf_policy_model_register_start_callback(struct xccdf_policy_model *model, policy_reporter_start func, void *usr)
Function to register start callback for checking system that will be called BEFORE each rule evaluati...
Definition: xccdf_policy.c:1590
OSCAP_API struct oscap_file_entry * oscap_file_entry_dup(struct oscap_file_entry *file_entry)
Definition: xccdf_policy.c:1175
OSCAP_API const char * xccdf_policy_get_id(struct xccdf_policy *policy)
Get ID of XCCDF Profile that is implemented by XCCDF Policy.
Definition: xccdf_policy.c:1554
OSCAP_API bool xccdf_policy_add_result(struct xccdf_policy *policy, struct xccdf_result *item)
Add result to XCCDF Policy Model.
OSCAP_API char * xccdf_value_binding_get_setvalue(const struct xccdf_value_binding *)
get Set Value from value bindings
struct xccdf_benchmark * benchmark
Benchmark element (root element of XML file)
Definition: xccdf_policy_priv.h:40
XCCDF value binding structure is binding between Refine values, Set values, Value element and Check e...
Definition: xccdf_policy.c:77
OSCAP_API bool oscap_file_entry_iterator_has_more(struct oscap_file_entry_iterator *it)
Definition: xccdf_policy.c:1208
Actual results of running a XCCDF test or profile.
Definition: xccdf_benchmark.h:233
OSCAP_API struct oscap_file_entry_list * oscap_file_entry_list_new(void)
Definition: xccdf_policy.c:1223
Open-scap XCCDF library interface.
OSCAP_API bool xccdf_policy_model_add_policy(struct xccdf_policy_model *, struct xccdf_policy *)
Add Policy to Policy Model.
xccdf_test_result_type_t
Test result.
Definition: xccdf_benchmark.h:169
OSCAP_API void oscap_file_entry_iterator_reset(struct oscap_file_entry_iterator *it)
Definition: xccdf_policy.c:1218
OSCAP_API void xccdf_policy_iterator_reset(struct xccdf_policy_iterator *it)
Reset the iterator structure (it will point to the first item in the list)
OSCAP_API struct oscap_htable_iterator * xccdf_policy_model_get_cpe_oval_sessions(struct xccdf_policy_model *model)
Retrieves an iterator of all OVAL sessions created for CPE applicability evaluation key is the OVAL h...
Definition: xccdf_policy.c:1541
OSCAP_API struct xccdf_result_iterator * xccdf_policy_get_results(const struct xccdf_policy *policy)
Get results of all XCCDF Policy results.
OSCAP_API bool xccdf_policy_is_item_selected(struct xccdf_policy *policy, const char *id)
Get the selection settings of the item.
Definition: xccdf_policy.c:614
xccdf_value_type_t
Type of an xccdf_value.
Definition: xccdf_benchmark.h:94
OSCAP_API bool xccdf_policy_model_add_cpe_lang_model_source(struct xccdf_policy_model *model, struct oscap_source *source)
Registers an additional CPE lang model for applicability testing The one embedded in the evaluated XC...
Definition: xccdf_policy.c:1525
OSCAP_API bool xccdf_policy_iterator_has_more(struct xccdf_policy_iterator *it)
Return true if the list is not empty, false otherwise.
OSCAP_API xccdf_value_type_t xccdf_value_binding_get_type(const struct xccdf_value_binding *)
get variable type from value bindings
xccdf_test_result_type_t(* xccdf_policy_engine_eval_fn)(struct xccdf_policy *policy, const char *rule_id, const char *definition_id, const char *href_if, struct xccdf_value_binding_iterator *value_binding_it, struct xccdf_check_import_iterator *check_imports_it, void *user_data)
Type of function which implements OpenSCAP checking engine.
Definition: xccdf_policy.h:103
OSCAP_API char * xccdf_policy_get_readable_item_title(struct xccdf_policy *policy, struct xccdf_item *item, const char *preferred_lang)
Get human readable title of given XCCDF Item.
Definition: xccdf_policy.c:133
OSCAP_API bool xccdf_policy_model_register_output_callback(struct xccdf_policy_model *model, policy_reporter_output func, void *usr)
Function to register output callback for checking system that will be called AFTER each rule evaluati...
Definition: xccdf_policy.c:1598
OSCAP_API bool xccdf_policy_resolve(struct xccdf_policy *policy)
Resolve benchmark by applying all refine_rules and refine_values to rules / values of benchmark...
Definition: xccdf_policy.c:1876
OSCAP_API struct oscap_file_entry_iterator * oscap_file_entry_list_get_files(struct oscap_file_entry_list *list)
Definition: xccdf_policy.c:1238
Definition: oscap_source.c:66
OSCAP_API struct xccdf_tailoring * xccdf_policy_model_get_tailoring(struct xccdf_policy_model *model)
Retrieves the Tailoring element used in this policy.
Definition: xccdf_policy.c:1501
OSCAP_API struct oscap_file_entry_list * xccdf_policy_model_get_systems_and_files(struct xccdf_policy_model *policy_model)
Return names of files that are used in checks of particular rules.
Definition: xccdf_policy.c:2131
OSCAP_API struct xccdf_value_binding_iterator * xccdf_policy_get_values(const struct xccdf_policy *item)
Get Value Bindings from XCCDF Policy.
XCCDF rule result.
Definition: item.h:344
OSCAP_API struct xccdf_result * xccdf_policy_evaluate(struct xccdf_policy *policy)
Call the checking engine for each selected rule in given policy structure
Definition: xccdf_policy.c:1989
OSCAP_API bool xccdf_policy_model_register_multicheck_callback(struct xccdf_policy_model *model, policy_reporter_multicheck func, void *usr)
Function to register callback for checking system that will be called DURING each rule evaluation if ...
Definition: xccdf_policy.c:1606
OSCAP_API void oscap_file_entry_free(struct oscap_file_entry *entry)
Definition: xccdf_policy.c:1186
OSCAP_API int xccdf_policy_get_selected_rules_count(struct xccdf_policy *policy)
Retrieves number of selected items in the policy.
Definition: xccdf_policy.c:627
XCCDF rule defines a test execution.
Definition: xccdf_benchmark.h:215
struct xccdf_policy_model * model
XCCDF Policy model.
Definition: xccdf_policy_priv.h:59
OSCAP_API void oscap_file_entry_list_free(struct oscap_file_entry_list *list)
Definition: xccdf_policy.c:1233
OSCAP_API struct xccdf_benchmark * xccdf_policy_model_get_benchmark(const struct xccdf_policy_model *item)
Get Benchmark from Policy Model.
OSCAP_API struct xccdf_policy_iterator * xccdf_policy_model_get_policies(const struct xccdf_policy_model *model)
Get policies from Policy Model.
XCCDF profile is a set of tests and their settings in a compact package.
Definition: xccdf_benchmark.h:203
OSCAP_API bool xccdf_policy_model_set_tailoring(struct xccdf_policy_model *model, struct xccdf_tailoring *tailoring)
Sets the Tailoring element to use in the policy.
Definition: xccdf_policy.c:1485
OSCAP_API const struct oscap_file_entry * oscap_file_entry_iterator_next(struct oscap_file_entry_iterator *it)
Definition: xccdf_policy.c:1203
OSCAP_API const char * oscap_file_entry_get_file(struct oscap_file_entry *entry)
Definition: xccdf_policy.c:1198
OSCAP_API struct xccdf_value_binding * xccdf_value_binding_new(void)
Constructor of structure with profile bindings - refine_rules, refine_values and set_values.
Definition: xccdf_policy.c:1817
OSCAP_API struct xccdf_result * xccdf_policy_get_result_by_id(struct xccdf_policy *policy, const char *id)
Get XCCDF Result structure by it&#39;s idetificator if there is one.
Definition: xccdf_policy.c:1613
XCCDF policy structure is abstract (class) structure of Profile element from benchmark.
Definition: xccdf_policy_priv.h:57
OSCAP_API char * xccdf_value_binding_get_value(const struct xccdf_value_binding *)
Get value from value bindings.
OSCAP_API void xccdf_value_binding_free(struct xccdf_value_binding *)
Destructor of Value binding structure.
Definition: xccdf_policy.c:2187
OSCAP_API bool xccdf_policy_model_add_cpe_autodetect_source(struct xccdf_policy_model *model, struct oscap_source *source)
Registers an additional CPE resource (either dictionary or language) Autodetects given file and acts ...
Definition: xccdf_policy.c:1533
xccdf_policy_engine_query_t
Type of a query over checking-engine data.
Definition: xccdf_policy.h:72
OSCAP_API char * xccdf_value_binding_get_name(const struct xccdf_value_binding *)
Get variable name from value bindings.
OSCAP_API struct xccdf_profile * xccdf_policy_get_profile(const struct xccdf_policy *)
Get XCCDF Profile from Policy.
OSCAP_API struct xccdf_policy_model * xccdf_policy_model_new(struct xccdf_benchmark *benchmark)
Constructor of Policy Model structure.
Definition: xccdf_policy.c:1641
struct xccdf_profile * profile
Profile structure (from benchmark)
Definition: xccdf_policy_priv.h:60
OSCAP_API bool xccdf_policy_add_select(struct xccdf_policy *, struct xccdf_select *)
Add rule to Policy.
Definition: xccdf_policy.c:1722
OSCAP_API void oscap_file_entry_iterator_free(struct oscap_file_entry_iterator *it)
Definition: xccdf_policy.c:1213
OSCAP_API bool xccdf_policy_model_add_cpe_dict(struct xccdf_policy_model *model, const char *cpe_dict)
Registers an additional CPE dictionary for applicability testing The one embedded in the evaluated XC...
Definition: xccdf_policy.c:1514
OSCAP_API void xccdf_policy_iterator_free(struct xccdf_policy_iterator *it)
Free the iterator structure (it makes no changes to the list structure)
OSCAP_API int xccdf_policy_model_build_all_useful_policies(struct xccdf_policy_model *policy_model)
Build all policies that can be useful for user.
Definition: xccdf_policy_model.c:153
OSCAP_API xccdf_test_result_type_t xccdf_test_result_resolve_and_operation(xccdf_test_result_type_t A, xccdf_test_result_type_t B)
Return result of the AND operation for two given attributes.
Definition: xccdf_policy.c:308
Result iterator.
Definition: xccdf_benchmark.h:457
OSCAP_API const char * xccdf_policy_get_value_of_item(struct xccdf_policy *policy, struct xccdf_item *item)
Get value of given value item in context of given policy.
Definition: xccdf_policy.c:2090
A base class for XCCDF items.
Definition: item.h:220
Definition: xccdf_policy.c:1164