Open SCAP Library
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
sce_check_result Struct Reference
Collaboration diagram for sce_check_result:
[legend]

Public Member Functions

OSCAP_API struct sce_check_resultsce_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_stringlistenvironment_variables
 
xccdf_test_result_type_t xccdf_result
 

Member Function Documentation

◆ sce_check_result_add_environment_variable()

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.

Parameters
varentry that will be added, in "VARIABLE_NAME=VARIABLE_VALUE" form

◆ sce_check_result_export()

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.

◆ sce_check_result_reset_environment_variables()

OSCAP_API void sce_check_result_reset_environment_variables ( struct sce_check_result v)

Clears the list of passed environment variables.

◆ sce_check_result_set_basename()

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.

◆ sce_check_result_set_href()

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.

◆ sce_check_result_set_stderr()

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.

Parameters
stderrshould contain output only from stderr

◆ sce_check_result_set_stdout()

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.

Parameters
stdoutshould contain output only from stdout

◆ sce_check_result_set_xccdf_result()

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)


The documentation for this struct was generated from the following files: