Open SCAP Library
|
Public Member Functions | |
OSCAP_API struct sce_check_result * | sce_check_result_new (void) |
OSCAP_API void | sce_check_result_free (struct sce_check_result *v) |
OSCAP_API void | sce_check_result_set_href (struct sce_check_result *v, const char *href) |
Sets the href used to execute the check that yielded given check result. More... | |
OSCAP_API const char * | sce_check_result_get_href (struct sce_check_result *v) |
OSCAP_API void | sce_check_result_set_basename (struct sce_check_result *v, const char *basename) |
Sets basename of the script that was used for check evaluation. More... | |
OSCAP_API const char * | sce_check_result_get_basename (struct sce_check_result *v) |
OSCAP_API void | sce_check_result_set_stdout (struct sce_check_result *v, const char *details) |
Sets stdout that was captured while script was evaluating. More... | |
OSCAP_API const char * | sce_check_result_get_stdout (struct sce_check_result *v) |
OSCAP_API void | sce_check_result_set_stderr (struct sce_check_result *v, const char *details) |
Sets stderr that was captured while script was evaluating. More... | |
OSCAP_API const char * | sce_check_result_get_stderr (struct sce_check_result *v) |
OSCAP_API void | sce_check_result_set_exit_code (struct sce_check_result *v, int exit_code) |
Sets exit code with which the script ended execution after evaluation. | |
OSCAP_API int | sce_check_result_get_exit_code (struct sce_check_result *v) |
OSCAP_API void | sce_check_result_reset_environment_variables (struct sce_check_result *v) |
Clears the list of passed environment variables. More... | |
OSCAP_API void | sce_check_result_add_environment_variable (struct sce_check_result *v, const char *var) |
Adds an environment variable entry to list of environment variables that were passed to the script. More... | |
OSCAP_API void | sce_check_result_set_xccdf_result (struct sce_check_result *v, xccdf_test_result_type_t result) |
Sets the final xccdf result (after exit code to xccdf mapping takes place) More... | |
OSCAP_API xccdf_test_result_type_t | sce_check_result_get_xccdf_result (struct sce_check_result *v) |
OSCAP_API void | sce_check_result_export (struct sce_check_result *v, const char *target_file) |
Exports details (in XML form) of given check result to given file. More... | |
Data Fields | |
char * | href |
char * | basename |
char * | std_out |
char * | std_err |
int | exit_code |
struct oscap_stringlist * | environment_variables |
xccdf_test_result_type_t | xccdf_result |
OSCAP_API void sce_check_result_add_environment_variable | ( | struct sce_check_result * | v, |
const char * | var | ||
) |
Adds an environment variable entry to list of environment variables that were passed to the script.
These include XCCDF result codes, bound XCCDF variables and possibly more.
sce_check_result contains these mostly for debugging purposes.
var | entry that will be added, in "VARIABLE_NAME=VARIABLE_VALUE" form |
OSCAP_API void sce_check_result_export | ( | struct sce_check_result * | v, |
const char * | target_file | ||
) |
Exports details (in XML form) of given check result to given file.
OSCAP_API void sce_check_result_reset_environment_variables | ( | struct sce_check_result * | v | ) |
Clears the list of passed environment variables.
OSCAP_API void sce_check_result_set_basename | ( | struct sce_check_result * | v, |
const char * | basename | ||
) |
Sets basename of the script that was used for check evaluation.
OSCAP_API void sce_check_result_set_href | ( | struct sce_check_result * | v, |
const char * | href | ||
) |
Sets the href used to execute the check that yielded given check result.
OSCAP_API void sce_check_result_set_stderr | ( | struct sce_check_result * | v, |
const char * | details | ||
) |
Sets stderr that was captured while script was evaluating.
stderr | should contain output only from stderr |
OSCAP_API void sce_check_result_set_stdout | ( | struct sce_check_result * | v, |
const char * | details | ||
) |
Sets stdout that was captured while script was evaluating.
stdout | should contain output only from stdout |
OSCAP_API void sce_check_result_set_xccdf_result | ( | struct sce_check_result * | v, |
xccdf_test_result_type_t | result | ||
) |
Sets the final xccdf result (after exit code to xccdf mapping takes place)