DTNMA Reference Tools v2.1.0 - 27.ge2c7586
Delay-Tolerant Networking Management Architecture (DTNMA) Tool Suite
Loading...
Searching...
No Matches
acl.c File Reference
#include "acl.h"
#include "eval.h"
#include "cace/ari/text.h"
#include "cace/util/logging.h"
#include "cace/util/defs.h"
+ Include dependency graph for acl.c:

Functions

void refda_acl_group_init (refda_acl_group_t *obj)
 
void refda_acl_group_deinit (refda_acl_group_t *obj)
 
void refda_acl_access_init (refda_acl_access_t *obj)
 
void refda_acl_access_deinit (refda_acl_access_t *obj)
 
void refda_acl_access_get_str_id (m_string_t out, const refda_acl_access_t *obj, bool append)
 
void refda_acl_init (refda_acl_t *obj)
 
void refda_acl_deinit (refda_acl_t *obj)
 
static cace_ari_translate_result_t acl_endpoint_filter_sub_label (cace_ari_t *out, const cace_ari_t *in, const cace_ari_translate_ctx_t *ctx)
 Translation helper function to substitute LABEL value 0 in a filter with the endpoint identity.
 
int refda_acl_search_endpoint (refda_agent_t *agent, const cace_ari_t *endpoint, refda_acl_id_tree_t groups)
 Search in an ACL for a specific endpoint.
 
bool refda_acl_search_permission (refda_agent_t *agent, const refda_acl_id_tree_t groups, const cace_amm_lookup_t *acc_obj, const cace_amm_obj_desc_ptr_set_t perm_objs, refda_amm_ident_base_ptr_set_t match)
 Search in an ACL for specific access.
 
bool refda_acl_search_one_permission (refda_agent_t *agent, const refda_acl_id_tree_t groups, const cace_amm_lookup_t *acc_obj, const cace_amm_obj_desc_t *perm_obj, refda_amm_ident_base_ptr_set_t match)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This searches for a single permission perm_obj which avoids needing to construct a permission set.
 

Function Documentation

◆ acl_endpoint_filter_sub_label()

static cace_ari_translate_result_t acl_endpoint_filter_sub_label ( cace_ari_t out,
const cace_ari_t in,
const cace_ari_translate_ctx_t ctx 
)
static

◆ refda_acl_access_deinit()

◆ refda_acl_access_get_str_id()

void refda_acl_access_get_str_id ( m_string_t  out,
const refda_acl_access_t obj,
bool  append 
)

◆ refda_acl_access_init()

◆ refda_acl_deinit()

◆ refda_acl_group_deinit()

◆ refda_acl_group_init()

◆ refda_acl_init()

◆ refda_acl_search_endpoint()

◆ refda_acl_search_one_permission()

bool refda_acl_search_one_permission ( refda_agent_t agent,
const refda_acl_id_tree_t  groups,
const cace_amm_lookup_t acc_obj,
const cace_amm_obj_desc_t perm_obj,
refda_amm_ident_base_ptr_set_t  match 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This searches for a single permission perm_obj which avoids needing to construct a permission set.

References agent, and refda_acl_search_permission().

Referenced by refda_valprod_run().

◆ refda_acl_search_permission()

bool refda_acl_search_permission ( refda_agent_t agent,
const refda_acl_id_tree_t  groups,
const cace_amm_lookup_t acc_obj,
const cace_amm_obj_desc_ptr_set_t  perm_objs,
refda_amm_ident_base_ptr_set_t  match 
)

Search in an ACL for specific access.

Parameters
[in]agentThe agent state for reference lookup.
[in]groupsThe set of groups to filter-in.
[in]acc_objThe object being accessed.
[in]perm_objsThe set of permission objects to filter-in.
[out]matchThe matching permissions.
Returns
True if permission is present and the match is non-empty.

References refda_acl_t::access_by_group, refda_agent_t::acl, refda_agent_t::acl_mutex, agent, cace_amm_objpat_set_match(), CACE_LOG_CRIT, CACE_LOG_DEBUG, cace_log_is_enabled_for(), refda_amm_ident_base_t::deref, cace_amm_lookup_t::obj, refda_acl_access_t::objects, and refda_acl_access_t::permissions.

Referenced by refda_acl_search_one_permission().