Loading...
Searching...
No Matches
sce_engine.c File Reference

Script Check Engine. More...

`#include "common/_error.h"`
`#include "common/util.h"`
`#include "common/list.h"`
`#include "common/oscap_acquire.h"`
`#include "common/oscap_string.h"`
`#include "common/debug_priv.h"`
`#include "sce_engine_api.h"`
`#include "oscap_helpers.h"`
`#include <stdlib.h>`
`#include <string.h>`
`#include <stdio.h>`
`#include <wait.h>`
`#include <unistd.h>`
`#include <sys/stat.h>`
`#include <assert.h>`
`#include <fcntl.h>`
`#include <sys/types.h>`
`#include <limits.h>`
`#include <libgen.h>`
Include dependency graph for sce_engine.c:

## Data Structures

struct | sce_check_result
struct | sce_session
struct | sce_parameters

## Macros

#define | SCE_SCRIPT "oscap-run-sce-script"

## Functions

struct sce_check_result * | sce_check_result_new (void)
void | sce_check_result_free (struct sce_check_result *v)
void | sce_check_result_set_href (struct sce_check_result *v, const char *href)
const char * | sce_check_result_get_href (struct sce_check_result *v)
void | sce_check_result_set_basename (struct sce_check_result *v, const char *base_name)
const char * | sce_check_result_get_basename (struct sce_check_result *v)
void | sce_check_result_set_stdout (struct sce_check_result *v, const char *_stdout)
const char * | sce_check_result_get_stdout (struct sce_check_result *v)
void | sce_check_result_set_stderr (struct sce_check_result *v, const char *_stderr)
const char * | sce_check_result_get_stderr (struct sce_check_result *v)
void | sce_check_result_set_exit_code (struct sce_check_result *v, int exit_code)
int | sce_check_result_get_exit_code (struct sce_check_result *v)
void | sce_check_result_reset_environment_variables (struct sce_check_result *v)
void | sce_check_result_add_environment_variable (struct sce_check_result *v, const char *var)
void | sce_check_result_set_xccdf_result (struct sce_check_result *v, xccdf_test_result_type_t result)
xccdf_test_result_type_t | sce_check_result_get_xccdf_result (struct sce_check_result *v)
void | sce_check_result_export (struct sce_check_result *v, const char *target_file)
struct sce_session * | sce_session_new (void)
void | sce_session_free (struct sce_session *s)
void | sce_session_reset (struct sce_session *s)
void | sce_session_add_check_result (struct sce_session *s, struct sce_check_result *result)
struct sce_check_result_iterator * | sce_session_get_check_results (struct sce_session *s)
void | sce_session_export_to_directory (struct sce_session *s, const char *directory)
struct sce_parameters * | sce_parameters_new (void)
void | sce_parameters_free (struct sce_parameters *v)
void | sce_parameters_set_xccdf_directory (struct sce_parameters *v, const char *value)
| Sets the directory that contains XCCDF that will reference SCE checks.
const char * | sce_parameters_get_xccdf_directory (struct sce_parameters *v)
void | sce_parameters_set_session (struct sce_parameters *v, struct sce_session *value)
struct sce_session * | sce_parameters_get_session (struct sce_parameters *v)
void | sce_parameters_allocate_session (struct sce_parameters *v)
xccdf_test_result_type_t | sce_engine_eval_rule (struct xccdf_policy *policy, const char *rule_id, const char *id, const char *href, struct xccdf_value_binding_iterator *value_binding_it, struct xccdf_check_import_iterator *check_import_it, void *usr)
| Internal rule evaluation callback, don't use directly.
bool | xccdf_policy_model_register_engine_sce (struct xccdf_policy_model *model, struct sce_parameters *parameters)
| Registers SCE to given policy model.

## Detailed Description

Script Check Engine.

## Function Documentation

## sce_engine_eval_rule()

xccdf_test_result_type_t sce_engine_eval_rule | ( | struct xccdf_policy * | policy,
|  | const char * | rule_id,
|  | const char * | id,
|  | const char * | href,
|  | struct xccdf_value_binding_iterator * | value_binding_it,
|  | struct xccdf_check_import_iterator * | check_import_it,
|  | void * | usr )

Internal rule evaluation callback, don't use directly.

See also
  xccdf_policy_model_register_engine_sce

## xccdf_policy_model_register_engine_sce()

bool xccdf_policy_model_register_engine_sce | ( | struct xccdf_policy_model * | model,
|  | struct sce_parameters * | sce_parameters )

Registers SCE to given policy model.

Parameters

  model | model to register SCE to
  sce_parameters | various parameters to be used with SCE (you are responsible to deallocate them!)