Asterisk - The Open Source Telephony Project
21.4.1
|
Named Access Control Lists. More...
#include "asterisk.h"
#include "asterisk/config.h"
#include "asterisk/config_options.h"
#include "asterisk/utils.h"
#include "asterisk/module.h"
#include "asterisk/cli.h"
#include "asterisk/acl.h"
#include "asterisk/astobj2.h"
#include "asterisk/paths.h"
#include "asterisk/stasis.h"
#include "asterisk/json.h"
#include "asterisk/security_events.h"
Go to the source code of this file.
Data Structures | |
struct | named_acl |
struct | named_acl_config |
Macros | |
#define | ACL_FAMILY "acls" |
#define | AST_MODULE "acl" |
#define | NACL_CONFIG "acl.conf" |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static int | acl_order_comparator (struct ast_category *p, struct ast_category *q) |
static | AO2_GLOBAL_OBJ_STATIC (globals) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
struct ast_ha * | ast_named_acl_find (const char *name, int *is_realtime, int *is_undefined) |
Retrieve a named ACL. More... | |
static void | cli_display_named_acl (int fd, const char *name) |
static void | cli_display_named_acl_list (int fd) |
CONFIG_INFO_CORE ("named_acl", cfg_info, globals, named_acl_config_alloc,.files=ACO_FILES(&named_acl_conf),) | |
static void | destroy_named_acl (void *obj) |
Destroy a named ACL object. | |
static char * | handle_show_named_acl_cmd (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
ACL command show <name> | |
static int | load_module (void) |
static void * | named_acl_alloc (const char *cat) |
Create a named ACL structure. More... | |
static void * | named_acl_config_alloc (void) |
allocator callback for named_acl_config. Notice it returns void * since it is used by the backend config code More... | |
static void | named_acl_config_destructor (void *obj) |
destructor for named_acl_config | |
static void * | named_acl_find (struct ao2_container *container, const char *cat) |
Find a named ACL in a container by its name. More... | |
static struct named_acl * | named_acl_find_realtime (const char *name) |
static int | publish_acl_change (const char *name) |
static int | reload_module (void) |
STASIS_MESSAGE_TYPE_DEFN (ast_named_acl_change_type) | |
Message type for named ACL changes. | |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = "acl" , .flags = AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_ORDER , .description = "Named ACL system" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "da6642af068ee5e6490c5b1d2cc1d238" , .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .reload = reload_module, .load_pri = AST_MODPRI_CORE, .requires = "extconfig", } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static struct ast_cli_entry | cli_named_acl [] |
struct aco_file | named_acl_conf |
static struct aco_type | named_acl_type |
struct aco_type * | named_acl_types [] = ACO_TYPES(&named_acl_type) |
Named Access Control Lists.
Definition in file named_acl.c.
struct ast_ha* ast_named_acl_find | ( | const char * | name, |
int * | is_realtime, | ||
int * | is_undefined | ||
) |
Retrieve a named ACL.
This function attempts to find a named ACL. If found, a copy of the requested ACL will be made which must be freed by the caller.
name | Name of the ACL sought | |
[out] | is_realtime | will be true if the ACL being returned is from realtime |
[out] | is_undefined | will be true if no ACL profile can be found for the requested name |
NULL | if no ACL could be found. |
Definition at line 293 of file named_acl.c.
References ao2_global_obj_ref, ast_check_realtime(), ast_duplicate_ha_list(), ast_realtime_is_mapping_defined(), named_acl_find(), and RAII_VAR.
Referenced by ast_append_acl().
|
static |
Create a named ACL structure.
cat | name given to the ACL |
NULL | failure |
non-NULL | successfully allocated named ACL |
Definition at line 161 of file named_acl.c.
References ast_copy_string(), and destroy_named_acl().
|
static |
allocator callback for named_acl_config. Notice it returns void * since it is used by the backend config code
Definition at line 126 of file named_acl.c.
References AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_hash, ao2_ref, and named_acl_config_destructor().
|
static |
Find a named ACL in a container by its name.
container | ao2container holding the named ACLs |
cat | name of the ACL wanted to be found |
pointer | to the named ACL if available. Null if not found. |
Definition at line 182 of file named_acl.c.
References ast_copy_string(), and OBJ_POINTER.
Referenced by ast_named_acl_find().
|
static |
Definition at line 525 of file named_acl.c.
struct aco_file named_acl_conf |
Definition at line 98 of file named_acl.c.