Beispiel #1
0
void KeepPromises(EvalContext *ctx, const Policy *policy, GenericAgentConfig *config)
{
    if (paths_acl != NULL || classes_acl != NULL || vars_acl != NULL ||
        literals_acl != NULL || query_acl != NULL || SV.path_shortcuts != NULL)
    {
        UnexpectedError("ACLs are not NULL - we are probably leaking memory!");
    }

    paths_acl     = calloc(1, sizeof(*paths_acl));
    classes_acl   = calloc(1, sizeof(*classes_acl));
    vars_acl      = calloc(1, sizeof(*vars_acl));
    literals_acl  = calloc(1, sizeof(*literals_acl));
    query_acl     = calloc(1, sizeof(*query_acl));
    SV.path_shortcuts = StringMapNew();

    if (paths_acl == NULL || classes_acl == NULL || vars_acl == NULL ||
        literals_acl == NULL || query_acl == NULL ||
        SV.path_shortcuts == NULL)
    {
        Log(LOG_LEVEL_CRIT, "calloc: %s", GetErrorStr());
        exit(255);
    }

    KeepContextBundles(ctx, policy);
    KeepControlPromises(ctx, policy, config);
    KeepPromiseBundles(ctx, policy);
}
void KeepPromises()

{
KeepContextBundles();
KeepControlPromises();
KeepPromiseBundles();
}
Beispiel #3
0
void KeepPromises(EvalContext *ctx, Policy *policy, GenericAgentConfig *config)
{
    KeepContextBundles(ctx, policy);
    KeepControlPromises(ctx, policy, config);
    KeepPromiseBundles(ctx, policy);
}
Beispiel #4
0
void KeepPromises(EvalContext *ctx, Policy *policy, GenericAgentConfig *config, const ReportContext *report_context)
{
    KeepContextBundles(ctx, policy, report_context);
    KeepControlPromises(ctx, policy, config);
    KeepPromiseBundles(ctx, policy, report_context);
}