oscap.h   oscap.h 
skipping to change at line 95 skipping to change at line 95
OSCAP_DOCUMENT_OVAL_VARIABLES, ///< OVAL Variables OSCAP_DOCUMENT_OVAL_VARIABLES, ///< OVAL Variables
OSCAP_DOCUMENT_OVAL_SYSCHAR, ///< OVAL system characteristi cs file OSCAP_DOCUMENT_OVAL_SYSCHAR, ///< OVAL system characteristi cs file
OSCAP_DOCUMENT_OVAL_RESULTS, ///< OVAL results file OSCAP_DOCUMENT_OVAL_RESULTS, ///< OVAL results file
OSCAP_DOCUMENT_OVAL_DIRECTIVES, ///< OVAL directives file OSCAP_DOCUMENT_OVAL_DIRECTIVES, ///< OVAL directives file
OSCAP_DOCUMENT_XCCDF, ///< XCCDF benchmark file OSCAP_DOCUMENT_XCCDF, ///< XCCDF benchmark file
OSCAP_DOCUMENT_CPE_LANGUAGE, ///< CPE language file OSCAP_DOCUMENT_CPE_LANGUAGE, ///< CPE language file
OSCAP_DOCUMENT_CPE_DICTIONARY, ///< CPE dictionary file OSCAP_DOCUMENT_CPE_DICTIONARY, ///< CPE dictionary file
OSCAP_DOCUMENT_CVE_FEED, ///< CVE NVD feed OSCAP_DOCUMENT_CVE_FEED, ///< CVE NVD feed
OSCAP_DOCUMENT_SCE_RESULT, ///< SCE result file OSCAP_DOCUMENT_SCE_RESULT, ///< SCE result file
OSCAP_DOCUMENT_SDS, ///< Source Data Stream file OSCAP_DOCUMENT_SDS, ///< Source Data Stream file
OSCAP_DOCUMENT_ARF ///< Result Data Stream file OSCAP_DOCUMENT_ARF, ///< Result Data Stream file
OSCAP_DOCUMENT_XCCDF_TAILORING ///< XCCDF tailoring file
} oscap_document_type_t; } oscap_document_type_t;
/**
* Convert @ref oscap_document_type_t constant to human readable (english)
* representation.
* @param type OpenSCAP Document Type
* @returns English string describing document type.
* @retval Returned value might be pointer to static memory and must not be
modified.
* @retval NULL in case of unrecognized document type
*/
const char *oscap_document_type_to_string(oscap_document_type_t type);
typedef int (*xml_reporter)(const char *file, int line, const char *msg, vo id *arg); typedef int (*xml_reporter)(const char *file, int line, const char *msg, vo id *arg);
/** /**
* Validate a SCAP document file against a XML schema. * Validate a SCAP document file against a XML schema.
* *
* Schemas are searched relative to path specified by the OSCAP_SCHEMA_PATH environment variable. * Schemas are searched relative to path specified by the OSCAP_SCHEMA_PATH environment variable.
* If the variable does not exist a default path is used (usually something like $PREFIX/share/openscap/schemas). * If the variable does not exist a default path is used (usually something like $PREFIX/share/openscap/schemas).
* *
* Directory structure must adhere $SCHEMA_PATH/$STANDARD/$VERSION/$SCHEMAF ILE.xsd structure, where $STANDARD * Directory structure must adhere $SCHEMA_PATH/$STANDARD/$VERSION/$SCHEMAF ILE.xsd structure, where $STANDARD
* is oval, xccdf, etc., and $VERSION is a version of the standard. * is oval, xccdf, etc., and $VERSION is a version of the standard.
* *
* @param xmlfile File to be validated. * @param xmlfile File to be validated.
* @param doctype Document type represented by the file. * @param doctype Document type represented by the file.
* @param version Version of the document, use NULL for library's default. * @param version Version of the document, use NULL for library's default.
* @param reporetr A reporter to by notified of encountered issues. Can be NULL, if a binary document validates / does not validate answer is satisfac tonary. * @param reporter A reporter to by notified of encountered issues. Can be NULL, if a binary document validates / does not validate answer is satisfac tonary.
* @param arg Argument for the reporter. * @param arg Argument for the reporter.
* @return 0 on pass; -1 error; 1 fail * @return 0 on pass; -1 error; 1 fail
*/ */
int oscap_validate_document(const char *xmlfile, oscap_document_type_t doct ype, const char *version, xml_reporter reporter, void *arg); int oscap_validate_document(const char *xmlfile, oscap_document_type_t doct ype, const char *version, xml_reporter reporter, void *arg);
/** /**
* Validate a SCAP document file against schematron rules. * Validate a SCAP document file against schematron rules.
* *
* The rules are searched relative to path specified by the OSCAP_SCHEMA_PA TH environment variable. * The rules are searched relative to path specified by the OSCAP_SCHEMA_PA TH environment variable.
* If the variable does not exist a default path is used (usually something like $PREFIX/share/openscap/schemas). * If the variable does not exist a default path is used (usually something like $PREFIX/share/openscap/schemas).
 End of changes. 3 change blocks. 
2 lines changed or deleted 14 lines changed or added


 oscap_error.h   oscap_error.h 
skipping to change at line 62 skipping to change at line 62
* @name OpenSCAP error families * @name OpenSCAP error families
* @{ * @{
*/ */
#define OSCAP_EFAMILY_NONE 0 /**< None */ #define OSCAP_EFAMILY_NONE 0 /**< None */
#define OSCAP_EFAMILY_GLIBC 1 /**< Errno errors */ #define OSCAP_EFAMILY_GLIBC 1 /**< Errno errors */
#define OSCAP_EFAMILY_XML 2 /**< Libxml errors */ #define OSCAP_EFAMILY_XML 2 /**< Libxml errors */
#define OSCAP_EFAMILY_OSCAP 3 /**< OSCAP general errors */ #define OSCAP_EFAMILY_OSCAP 3 /**< OSCAP general errors */
#define OSCAP_EFAMILY_OVAL 4 /**< OVAL errors (OVAL & probes) */ #define OSCAP_EFAMILY_OVAL 4 /**< OVAL errors (OVAL & probes) */
#define OSCAP_EFAMILY_XCCDF 5 /**< XCCDF errors */ #define OSCAP_EFAMILY_XCCDF 5 /**< XCCDF errors */
#define OSCAP_EFAMILY_SCE 6 /**< SCE errors */ #define OSCAP_EFAMILY_SCE 6 /**< SCE errors */
#define OSCAP_EFAMILY_NET 7 /**< Errors from network communicati on. Presumably from libcurl. */
/** @} */ /** @} */
/** /**
* Clear an error. * Clear an error.
*/ */
void oscap_clearerr(void); void oscap_clearerr(void);
/** /**
* Check for an error. * Check for an error.
*/ */
skipping to change at line 84 skipping to change at line 85
/** /**
* Get last error family. * Get last error family.
*/ */
oscap_errfamily_t oscap_err_family(void); oscap_errfamily_t oscap_err_family(void);
/** /**
* Get last error description. * Get last error description.
*/ */
const char *oscap_err_desc(void); const char *oscap_err_desc(void);
/**
* Get the full description for all the errors which has occured in this
* thread since the last call of this function or \ref oscap_clearerr.
* This function is destructive. Subsequent call shall return NULL.
* @returns zero terminated string describing these errors, which shall
* be disposed by caller.
* @retval NULL if there are no errors.
*/
char *oscap_err_get_full_error(void);
/// @} /// @}
/// @} /// @}
#endif /* OSCAP_ERROR_H */ #endif /* OSCAP_ERROR_H */
 End of changes. 2 change blocks. 
0 lines changed or deleted 11 lines changed or added


 oval_agent_xccdf_api.h   oval_agent_xccdf_api.h 
skipping to change at line 38 skipping to change at line 38
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A
* *
*/ */
#ifndef OVAL_AGENT_XCCDF_API_H_ #ifndef OVAL_AGENT_XCCDF_API_H_
#define OVAL_AGENT_XCCDF_API_H_ #define OVAL_AGENT_XCCDF_API_H_
#include <oscap.h>
#include "oval_agent_api.h" #include "oval_agent_api.h"
#include "xccdf_policy.h" #include "xccdf_policy.h"
/** /**
* @param policy XCCDF Policy that is being evaluated * @param policy XCCDF Policy that is being evaluated
* @param rule_id ID of XCCDF Rule * @param rule_id ID of XCCDF Rule
* @param id ID of OVAL definition * @param id ID of OVAL definition
* @param it XCCDF Value Binding iterator with value bindings * @param it XCCDF Value Binding iterator with value bindings
* @param usr Void pointer to the user data structure * @param usr Void pointer to the user data structure
* @return XCCDF test result type of evaluated rule * @return XCCDF test result type of evaluated rule
skipping to change at line 101 skipping to change at line 102
* @param model XCCDF Policy Model * @param model XCCDF Policy Model
* @param sess oval_agent_session_t parameter for passing session data to c allback * @param sess oval_agent_session_t parameter for passing session data to c allback
* @memberof xccdf_policy_model * @memberof xccdf_policy_model
* @return true if callback registered succesfully, false otherwise * @return true if callback registered succesfully, false otherwise
*/ */
bool xccdf_policy_model_register_engine_oval(struct xccdf_policy_model * mo del, struct oval_agent_session * sess); bool xccdf_policy_model_register_engine_oval(struct xccdf_policy_model * mo del, struct oval_agent_session * sess);
/** /**
* @deprecated * @deprecated
* Transform OVAL Sysinfo into XCCDF Test Result * Transform OVAL Sysinfo into XCCDF Test Result
* This function has been deprecated, please use xccdf_result_fill_sysinfo( ..) instead * This function has been deprecated, please use @ref xccdf_result_fill_sys info() instead
* *
* @param session OVAL Agent session * @param session OVAL Agent session
* @param ritem XCCDF Result * @param ritem XCCDF Result
*/ */
void oval_agent_export_sysinfo_to_xccdf_result(struct oval_agent_session * session, struct xccdf_result * ritem); OSCAP_DEPRECATED(void oval_agent_export_sysinfo_to_xccdf_result(struct oval _agent_session * session, struct xccdf_result * ritem));
/** /**
* @} END OVALDEF * @} END OVALDEF
* @} END OVALAGENT * @} END OVALAGENT
*/ */
#endif /**OVAL_AGENT_XCCDF_API_H_ */ #endif /**OVAL_AGENT_XCCDF_API_H_ */
 End of changes. 3 change blocks. 
2 lines changed or deleted 3 lines changed or added


 xccdf_benchmark.h   xccdf_benchmark.h 
skipping to change at line 230 skipping to change at line 230
* XCCDF Value allows test parametrization or capturing output of tests. * XCCDF Value allows test parametrization or capturing output of tests.
*/ */
struct xccdf_value; struct xccdf_value;
/** /**
* @struct xccdf_result * @struct xccdf_result
* Actual results of running a XCCDF test or profile. * Actual results of running a XCCDF test or profile.
*/ */
struct xccdf_result; struct xccdf_result;
/**
* @struct xccdf_tailoring
* Stores content from xccdf:Tailoring element which can be loaded from
* a separate file.
*/
struct xccdf_tailoring;
/*--------------------*\ /*--------------------*\
| Support structures | | Support structures |
\*--------------------*/ \*--------------------*/
/** /**
* @struct xccdf_notice * @struct xccdf_notice
* XCCDF benchmark legal notice. * XCCDF benchmark legal notice.
*/ */
struct xccdf_notice; struct xccdf_notice;
skipping to change at line 885 skipping to change at line 892
/// @memberof xccdf_refine_rule /// @memberof xccdf_refine_rule
void xccdf_refine_rule_free(struct xccdf_refine_rule *obj); void xccdf_refine_rule_free(struct xccdf_refine_rule *obj);
/// @memberof xccdf_refine_value /// @memberof xccdf_refine_value
void xccdf_refine_value_free(struct xccdf_refine_value *rv); void xccdf_refine_value_free(struct xccdf_refine_value *rv);
void xccdf_setvalue_free(struct xccdf_setvalue *sv); void xccdf_setvalue_free(struct xccdf_setvalue *sv);
/** /**
* Release library internal caches. * Release library internal caches.
* @deprecated Use oscap_cleanup() instead. * @deprecated Use @ref oscap_cleanup() instead.
*/ */
void xccdf_cleanup(void); OSCAP_DEPRECATED(void xccdf_cleanup(void));
/** /**
* Create a group and append it to the benchmark. * Create a group and append it to the benchmark.
* @param id - the identifier of the appended value. * @param id - the identifier of the appended value.
* @return the handle of the new group. * @return the handle of the new group.
*/ */
struct xccdf_group *xccdf_benchmark_append_new_group(struct xccdf_benchmark *, const char *id); struct xccdf_group *xccdf_benchmark_append_new_group(struct xccdf_benchmark *, const char *id);
/** /**
* Create a value and append it to the benchmark. * Create a value and append it to the benchmark.
skipping to change at line 2399 skipping to change at line 2406
/// @memberof xccdf_benchmark /// @memberof xccdf_benchmark
const char *xccdf_benchmark_get_version_update(const struct xccdf_benchmark *benchmark); const char *xccdf_benchmark_get_version_update(const struct xccdf_benchmark *benchmark);
/// @memberof xccdf_benchmark /// @memberof xccdf_benchmark
const char *xccdf_benchmark_get_version_time(const struct xccdf_benchmark * benchmark); const char *xccdf_benchmark_get_version_time(const struct xccdf_benchmark * benchmark);
/// @memberof xccdf_profile /// @memberof xccdf_profile
const char *xccdf_profile_get_version_update(const struct xccdf_profile *pr ofile); const char *xccdf_profile_get_version_update(const struct xccdf_profile *pr ofile);
/// @memberof xccdf_profile /// @memberof xccdf_profile
const char *xccdf_profile_get_version_time(const struct xccdf_profile *prof ile); const char *xccdf_profile_get_version_time(const struct xccdf_profile *prof ile);
/// @memberof xccdf_profile /// @memberof xccdf_profile
bool xccdf_profile_get_tailoring(const struct xccdf_profile *profile);
/// @memberof xccdf_profile
const char *xccdf_profile_get_note_tag(const struct xccdf_profile *profile) ; const char *xccdf_profile_get_note_tag(const struct xccdf_profile *profile) ;
/// @memberof xccdf_rule /// @memberof xccdf_rule
const char *xccdf_rule_get_version_update(const struct xccdf_rule *rule); const char *xccdf_rule_get_version_update(const struct xccdf_rule *rule);
/// @memberof xccdf_rule /// @memberof xccdf_rule
const char *xccdf_rule_get_version_time(const struct xccdf_rule *rule); const char *xccdf_rule_get_version_time(const struct xccdf_rule *rule);
/// @memberof xccdf_rule /// @memberof xccdf_rule
struct xccdf_benchmark *xccdf_rule_get_benchmark(const struct xccdf_rule *r ule); struct xccdf_benchmark *xccdf_rule_get_benchmark(const struct xccdf_rule *r ule);
/// @memberof xccdf_group /// @memberof xccdf_group
skipping to change at line 2582 skipping to change at line 2591
/// @memberof xccdf_target_identifier /// @memberof xccdf_target_identifier
const char *xccdf_target_identifier_get_href(const struct xccdf_target_iden tifier *item); const char *xccdf_target_identifier_get_href(const struct xccdf_target_iden tifier *item);
/// @memberof xccdf_target_identifier /// @memberof xccdf_target_identifier
const char *xccdf_target_identifier_get_name(const struct xccdf_target_iden tifier *item); const char *xccdf_target_identifier_get_name(const struct xccdf_target_iden tifier *item);
/// @memberof xccdf_instance /// @memberof xccdf_instance
const char *xccdf_instance_get_context(const struct xccdf_instance *item); const char *xccdf_instance_get_context(const struct xccdf_instance *item);
/// @memberof xccdf_instance /// @memberof xccdf_instance
const char *xccdf_instance_get_parent_context(const struct xccdf_instance * item); const char *xccdf_instance_get_parent_context(const struct xccdf_instance * item);
/// @memberof xccdf_instance /// @memberof xccdf_instance
const char *xccdf_instance_get_content(const struct xccdf_instance *item); const char *xccdf_instance_get_content(const struct xccdf_instance *item);
/// @memberof xccdf_tailoring
struct xccdf_tailoring *xccdf_tailoring_import(const char *file, struct xcc
df_benchmark *benchmark);
/// @memberof xccdf_tailoring
const char *xccdf_tailoring_get_version(const struct xccdf_tailoring *tailo
ring);
/// @memberof xccdf_tailoring
const char *xccdf_tailoring_get_version_update(const struct xccdf_tailoring
*tailoring);
/// @memberof xccdf_tailoring
const char *xccdf_tailoring_get_version_time(const struct xccdf_tailoring *
tailoring);
/// @memberof xccdf_tailoring
struct oscap_string_iterator *xccdf_tailoring_get_metadata(const struct xcc
df_tailoring *tailoring);
/// @memberof xccdf_tailoring
struct xccdf_profile_iterator *xccdf_tailoring_get_profiles(const struct xc
cdf_tailoring *tailoring);
/// @memberof xccdf_tailoring
struct xccdf_status_iterator *xccdf_tailoring_get_statuses(const struct xcc
df_tailoring *tailoring);
/// @memberof xccdf_tailoring
struct oscap_reference_iterator *xccdf_tailoring_get_dc_statuses(const stru
ct xccdf_tailoring *tailoring);
/**
* @param profile_id id of the profile that should be returned or NULL for
default profile
* @note
* Unlike in XCCDF Benchmark, the default profile from Tailoring element ne
edn't
* match the "selected" attribute from each individual XCCDF Item.
* @memberof xccdf_tailoring
*/
struct xccdf_profile *xccdf_tailoring_get_profile_by_id(const struct xccdf_
tailoring *tailoring, const char *profile_id);
/************************************************************ /************************************************************
** @} End of Getters group */ ** @} End of Getters group */
/************************************************************/ /************************************************************/
/** /**
* @name Setters * @name Setters
* For lists use add functions. Parameters of set functions are duplicated in memory and need to * For lists use add functions. Parameters of set functions are duplicated in memory and need to
* be freed by caller. * be freed by caller.
* @{ * @{
skipping to change at line 2660 skipping to change at line 2693
bool xccdf_profile_set_prohibit_changes(struct xccdf_profile *item, bool ne wval); bool xccdf_profile_set_prohibit_changes(struct xccdf_profile *item, bool ne wval);
/// @memberof xccdf_profile /// @memberof xccdf_profile
bool xccdf_profile_set_extends(struct xccdf_profile *item, const char *newv al); bool xccdf_profile_set_extends(struct xccdf_profile *item, const char *newv al);
/// @memberof xccdf_profile /// @memberof xccdf_profile
bool xccdf_profile_set_version(struct xccdf_profile *item, const char *newv al); bool xccdf_profile_set_version(struct xccdf_profile *item, const char *newv al);
/// @memberof xccdf_profile /// @memberof xccdf_profile
bool xccdf_profile_set_version_time(struct xccdf_profile *item, const char *newval); bool xccdf_profile_set_version_time(struct xccdf_profile *item, const char *newval);
/// @memberof xccdf_profile /// @memberof xccdf_profile
bool xccdf_profile_set_version_update(struct xccdf_profile *item, const cha r *newval); bool xccdf_profile_set_version_update(struct xccdf_profile *item, const cha r *newval);
/// @memberof xccdf_profile /// @memberof xccdf_profile
bool xccdf_profile_set_tailoring(struct xccdf_profile *item, bool tailoring
);
/// @memberof xccdf_profile
bool xccdf_profile_add_metadata(struct xccdf_profile* item, const char* met adata); bool xccdf_profile_add_metadata(struct xccdf_profile* item, const char* met adata);
/// @memberof xccdf_rule /// @memberof xccdf_rule
bool xccdf_rule_set_id(struct xccdf_rule *item, const char *newval); bool xccdf_rule_set_id(struct xccdf_rule *item, const char *newval);
/// @memberof xccdf_rule /// @memberof xccdf_rule
bool xccdf_rule_set_cluster_id(struct xccdf_rule *item, const char *newval) ; bool xccdf_rule_set_cluster_id(struct xccdf_rule *item, const char *newval) ;
/// @memberof xccdf_rule /// @memberof xccdf_rule
bool xccdf_rule_set_extends(struct xccdf_rule *item, const char *newval); bool xccdf_rule_set_extends(struct xccdf_rule *item, const char *newval);
/// @memberof xccdf_rule /// @memberof xccdf_rule
bool xccdf_rule_set_version(struct xccdf_rule *item, const char *newval); bool xccdf_rule_set_version(struct xccdf_rule *item, const char *newval);
skipping to change at line 3269 skipping to change at line 3304
void xccdf_rule_result_iterator_reset(struct xccdf_rule_result_iterator *it ); void xccdf_rule_result_iterator_reset(struct xccdf_rule_result_iterator *it );
/// @memberof xccdf_identity_iterator /// @memberof xccdf_identity_iterator
void xccdf_identity_iterator_reset(struct xccdf_identity_iterator *it); void xccdf_identity_iterator_reset(struct xccdf_identity_iterator *it);
/// @memberof xccdf_score_iterator /// @memberof xccdf_score_iterator
void xccdf_score_iterator_reset(struct xccdf_score_iterator *it); void xccdf_score_iterator_reset(struct xccdf_score_iterator *it);
/// @memberof xccdf_target_fact_iterator /// @memberof xccdf_target_fact_iterator
void xccdf_target_fact_iterator_reset(struct xccdf_target_fact_iterator *it ); void xccdf_target_fact_iterator_reset(struct xccdf_target_fact_iterator *it );
// textual substitution interface // textual substitution interface
/// Type of textual substitution /**
* Type of textual substitution
* @deprecated This type is deprecated. It is not flexible enough to be app
lied on XCCDF 1.2+
* documents. Please use @ref xml_iterate module instead.
*/
typedef enum xccdf_subst_type { typedef enum xccdf_subst_type {
XCCDF_SUBST_NONE, XCCDF_SUBST_NONE,
XCCDF_SUBST_SUB, ///< substitute cdf:sub element XCCDF_SUBST_SUB, ///< substitute cdf:sub element
XCCDF_SUBST_LINK, ///< substitute a hyperlink XCCDF_SUBST_LINK, ///< substitute a hyperlink
XCCDF_SUBST_INSTANCE ///< substitute cdf:instance element XCCDF_SUBST_INSTANCE ///< substitute cdf:instance element
} xccdf_subst_type_t; } xccdf_subst_type_t;
/** /**
* Textual substitution callback. * Textual substitution callback.
* This function is supposed to return textual representation of the substi tution with given ID. * This function is supposed to return textual representation of the substi tution with given ID.
* @param type Type of the substitution * @param type Type of the substitution
* @param id ID of the object to be substituted * @param id ID of the object to be substituted
* @param arg arbitrary user-defined argument * @param arg arbitrary user-defined argument
* @return newly allocated substitution string (will be free'd) * @return newly allocated substitution string (will be free'd)
* @deprecated This callback has been deprecated. It cannot be applied on X
CCDF 1.2+ documents
* given the xccdf:sub/@use parameter.
*/ */
typedef char*(*xccdf_substitution_func)(xccdf_subst_type_t type, const char *id, void *arg); typedef char*(*xccdf_substitution_func)(xccdf_subst_type_t type, const char *id, void *arg);
/** /**
* Perform a textual substitution. * Perform a textual substitution.
* Calls @a cb on each substitution (e.g. a cdf:sub element) of @a text and returns a string with substitutions done. * Calls @a cb on each substitution (e.g. a cdf:sub element) of @a text and returns a string with substitutions done.
* @param text source text * @param text source text
* @param cb substitution callback * @param cb substitution callback
* @param arg arbitrary argument to be passed to he callback * @param arg arbitrary argument to be passed to he callback
* @return substituted string (it is up to the caller to free it) * @return substituted string (it is up to the caller to free it)
* @deprecated This function has been deprecated. It cannot be applied on X
CCDF 1.2+ documents
* given the xccdf:sub/@use parameter.
*/ */
char* oscap_text_xccdf_substitute(const char *text, xccdf_substitution_func cb, void *arg); OSCAP_DEPRECATED(char* oscap_text_xccdf_substitute(const char *text, xccdf_ substitution_func cb, void *arg));
/************************************************************/ /************************************************************/
/** @} End of XCCDF group */ /** @} End of XCCDF group */
/// @} /// @}
#endif #endif
 End of changes. 10 change blocks. 
4 lines changed or deleted 62 lines changed or added


 xccdf_policy.h   xccdf_policy.h 
skipping to change at line 105 skipping to change at line 105
* perform evaluation on the machine. * perform evaluation on the machine.
*/ */
typedef xccdf_test_result_type_t (*xccdf_policy_engine_eval_fn) (struct xcc df_policy *policy, const char *rule_id, const char *definition_id, const ch ar *href_if, struct xccdf_value_binding_iterator *value_binding_it, struct xccdf_check_import_iterator *check_imports_it, void *user_data); typedef xccdf_test_result_type_t (*xccdf_policy_engine_eval_fn) (struct xcc df_policy *policy, const char *rule_id, const char *definition_id, const ch ar *href_if, struct xccdf_value_binding_iterator *value_binding_it, struct xccdf_check_import_iterator *check_imports_it, void *user_data);
/************************************************************/ /************************************************************/
/** /**
* Constructor of Policy Model structure * Constructor of Policy Model structure
* @param benchmark Struct xccdf_benchmark with benchmark model * @param benchmark Struct xccdf_benchmark with benchmark model
* @return new xccdf_policy_model * @return new xccdf_policy_model
* @note
* The policy model will take ownership of given benchmark and free it
* when it's being destructed!
* @memberof xccdf_policy_model * @memberof xccdf_policy_model
*/ */
struct xccdf_policy_model *xccdf_policy_model_new(struct xccdf_benchmark *b enchmark); struct xccdf_policy_model *xccdf_policy_model_new(struct xccdf_benchmark *b enchmark);
/** /**
* Constructor of Policy structure * Constructor of Policy structure
* @param model Policy model * @param model Policy model
* @param profile Profile from XCCDF Benchmark * @param profile Profile from XCCDF Benchmark
* @memberof xccdf_policy * @memberof xccdf_policy
*/ */
skipping to change at line 143 skipping to change at line 146
*/ */
void xccdf_policy_free(struct xccdf_policy *); void xccdf_policy_free(struct xccdf_policy *);
/** /**
* Destructor of Value binding structure * Destructor of Value binding structure
* @memberof xccdf_value_binding * @memberof xccdf_value_binding
*/ */
void xccdf_value_binding_free(struct xccdf_value_binding *); void xccdf_value_binding_free(struct xccdf_value_binding *);
/** /**
* Sets the Tailoring element to use in the policy.
*
* Profiles from the Benchmark *may* be shadowed by profiles in the given
* Tailoring element! Calling this function will affect the results of
* xccdf_policy_model_get_policy_by_id calls.
*
* @important This does INVALIDATE preexisting xccdf_policy pointers in
* this xccdf_policy_model! It is recommended to call this function before
* policy for any profile is queried.
*
* @note
* The policy model will take ownership of given tailoring and free it
* when it's being destructed or when new tailoring is being set.
*/
bool xccdf_policy_model_set_tailoring(struct xccdf_policy_model *model, str
uct xccdf_tailoring *tailoring);
/**
* Retrieves the Tailoring element used in this policy.
* @memberof xccdf_policy_model
*/
struct xccdf_tailoring *xccdf_policy_model_get_tailoring(struct xccdf_polic
y_model *model);
/**
* Registers an additional CPE dictionary for applicability testing * Registers an additional CPE dictionary for applicability testing
* The one embedded in the evaluated XCCDF take precedence! * The one embedded in the evaluated XCCDF take precedence!
*/ */
bool xccdf_policy_model_add_cpe_dict(struct xccdf_policy_model * model, con st char * cpe_dict); bool xccdf_policy_model_add_cpe_dict(struct xccdf_policy_model * model, con st char * cpe_dict);
/** /**
* Registers an additional CPE lang model for applicability testing * Registers an additional CPE lang model for applicability testing
* The one embedded in the evaluated XCCDF take precedence! * The one embedded in the evaluated XCCDF take precedence!
*/ */
bool xccdf_policy_model_add_cpe_lang_model(struct xccdf_policy_model * mode l, const char * cpe_lang); bool xccdf_policy_model_add_cpe_lang_model(struct xccdf_policy_model * mode l, const char * cpe_lang);
skipping to change at line 170 skipping to change at line 196
/** /**
* Function to register callback for checking system * Function to register callback for checking system
* @param model XCCDF Policy Model * @param model XCCDF Policy Model
* @param sys String representing given checking system * @param sys String representing given checking system
* @param func Callback - pointer to function called by XCCDF Policy system when rule parsed * @param func Callback - pointer to function called by XCCDF Policy system when rule parsed
* @param usr optional parameter for passing user data to callback * @param usr optional parameter for passing user data to callback
* @memberof xccdf_policy_model * @memberof xccdf_policy_model
* @return true if callback registered succesfully, false otherwise * @return true if callback registered succesfully, false otherwise
* *
* @deprecated This function is deprecated by xccdf_policy_model_register_e ngine_and_query_callback * @deprecated This function is deprecated by @ref xccdf_policy_model_regis ter_engine_and_query_callback
* and might be dropped from future releases. * and might be dropped from future releases.
*/ */
OSCAP_DEPRECATED(bool xccdf_policy_model_register_engine_callback(struct xc cdf_policy_model * model, char * sys, void * func, void * usr)); OSCAP_DEPRECATED(bool xccdf_policy_model_register_engine_callback(struct xc cdf_policy_model * model, char * sys, void * func, void * usr));
/** /**
* Function to register callback for checking system * Function to register callback for checking system
* @param model XCCDF Policy Model * @param model XCCDF Policy Model
* @param sys String representing given checking system * @param sys String representing given checking system
* @param eval_fn Callback - pointer to function called by XCCDF Policy sys tem when rule parsed * @param eval_fn Callback - pointer to function called by XCCDF Policy sys tem when rule parsed
* @param usr optional parameter for passing user data to callback * @param usr optional parameter for passing user data to callback
skipping to change at line 366 skipping to change at line 392
* Add rule to Policy * Add rule to Policy
* @memberof xccdf_policy * @memberof xccdf_policy
* @return true if rule has been added succesfully * @return true if rule has been added succesfully
*/ */
bool xccdf_policy_add_select(struct xccdf_policy *, struct xccdf_select *); bool xccdf_policy_add_select(struct xccdf_policy *, struct xccdf_select *);
/** /**
* Set a new selector to the Policy structure * Set a new selector to the Policy structure
* @memberof xccdf_policy * @memberof xccdf_policy
* @return true if rule has been added succesfully * @return true if rule has been added succesfully
* @deprecated This function is deprecated by xccdf_policy_add_select * @deprecated This function is deprecated by @ref xccdf_policy_add_select
* and might be dropped from future releases. * and might be dropped from future releases.
*/ */
OSCAP_DEPRECATED( OSCAP_DEPRECATED(
bool xccdf_policy_set_selected(struct xccdf_policy * policy, char * idref) bool xccdf_policy_set_selected(struct xccdf_policy * policy, char * idref)
); );
/** /**
* Add result to XCCDF Policy Model * Add result to XCCDF Policy Model
* @memberof xccdf_policy_model * @memberof xccdf_policy_model
*/ */
skipping to change at line 392 skipping to change at line 418
* @return true if rule has been added succesfully * @return true if rule has been added succesfully
*/ */
bool xccdf_policy_add_value(struct xccdf_policy *, struct xccdf_value_bindi ng *); bool xccdf_policy_add_value(struct xccdf_policy *, struct xccdf_value_bindi ng *);
/** /**
* Get the selection settings of the item. * Get the selection settings of the item.
* @memberof xccdf_policy * @memberof xccdf_policy
* @return true if the item is selected * @return true if the item is selected
*/ */
bool xccdf_policy_is_item_selected(struct xccdf_policy *policy, const char *id); bool xccdf_policy_is_item_selected(struct xccdf_policy *policy, const char *id);
/**
* Retrieves number of selected items in the policy
* @note This is meant to be used to estimate scanning progress for example
.
*/
int xccdf_policy_get_selected_rules_count(struct xccdf_policy *policy);
/** /**
* Get select from policy by specified ID of XCCDF Item * Get select from policy by specified ID of XCCDF Item
* @memberof xccdf_policy * @memberof xccdf_policy
* @return XCCDF Select * @return XCCDF Select
*/ */
struct xccdf_select * xccdf_policy_get_select_by_id(struct xccdf_policy * p olicy, const char *item_id); struct xccdf_select * xccdf_policy_get_select_by_id(struct xccdf_policy * p olicy, const char *item_id);
/************************************************************/ /************************************************************/
/** @} End of Setters group */ /** @} End of Setters group */
 End of changes. 5 change blocks. 
2 lines changed or deleted 38 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/