Skip to content

Commit

Permalink
Inform user when a state references a variable
Browse files Browse the repository at this point in the history
A state can reference a variable. This information is important
when that variable references an object which needs to be evaluated
first. This commit adds a info message which prints state id,
variable id and type of variable (local/static/external).
  • Loading branch information
jan-cerny committed Nov 28, 2015
1 parent abc89ab commit 6aff4d8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/OVAL/oval_probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,12 @@ static int oval_probe_query_criteria(oval_probe_session_t *sess, struct oval_cri
if (oval_entity_get_varref_type(entity) == OVAL_ENTITY_VARREF_ATTRIBUTE) {
oval_syschar_collection_flag_t flag;
struct oval_variable *var = oval_entity_get_variable(entity);
const char *state_id = oval_state_get_id(state);
oval_variable_type_t var_type = oval_variable_get_type(var);
const char *var_type_text = oval_variable_type_get_text(var_type);
const char *var_id = oval_variable_get_id(var);
dI("State '%s' references %s '%s'.\n", state_id,
var_type_text, var_id);

ret = oval_probe_query_variable(sess, var);
if (ret == -1) {
Expand Down

0 comments on commit 6aff4d8

Please sign in to comment.