The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Handle the the main server's (radiusd) configuration. More...
#include <freeradius-devel/server/cf_file.h>
#include <freeradius-devel/server/cf_util.h>
#include <freeradius-devel/server/client.h>
#include <freeradius-devel/server/dependency.h>
#include <freeradius-devel/server/main_config.h>
#include <freeradius-devel/server/map_proc.h>
#include <freeradius-devel/server/modpriv.h>
#include <freeradius-devel/server/module.h>
#include <freeradius-devel/server/util.h>
#include <freeradius-devel/server/virtual_servers.h>
#include <freeradius-devel/unlang/xlat.h>
#include <freeradius-devel/util/conf.h>
#include <freeradius-devel/util/debug.h>
#include <freeradius-devel/util/dict.h>
#include <freeradius-devel/util/file.h>
#include <freeradius-devel/util/hw.h>
#include <freeradius-devel/util/perm.h>
#include <freeradius-devel/util/sem.h>
#include <freeradius-devel/util/token.h>
#include <freeradius-devel/util/pair_legacy.h>
#include <freeradius-devel/unlang/xlat_func.h>
#include <sys/stat.h>
#include <pwd.h>
#include <grp.h>
#include <unistd.h>
#include <sys/types.h>
Go to the source code of this file.
Functions | |
static int | _dlhandle_free (void **dl_handle) |
static int | hostname_lookups_parse (TALLOC_CTX *ctx, void *out, void *parent, CONF_ITEM *ci, conf_parser_t const *rule) |
void | hup_logfile (main_config_t *config) |
static int | lib_dir_on_read (TALLOC_CTX *ctx, void *out, void *parent, CONF_ITEM *ci, conf_parser_t const *rule) |
static int | lib_dir_on_read (UNUSED TALLOC_CTX *ctx, UNUSED void *out, UNUSED void *parent, CONF_ITEM *ci, UNUSED conf_parser_t const *rule) |
main_config_t * | main_config_alloc (TALLOC_CTX *ctx) |
Allocate a main_config_t struct, setting defaults. More... | |
void | main_config_dict_dir_set (main_config_t *config, char const *name) |
Set the global dictionary directory. More... | |
int | main_config_exclusive_proc (main_config_t *config) |
Check to see if we're the only process using this configuration file (or PID file if specified) More... | |
int | main_config_exclusive_proc_child (UNUSED main_config_t const *config) |
Increment the semaphore in the child process so that it's not released when the parent exits. More... | |
void | main_config_exclusive_proc_done (UNUSED main_config_t const *config) |
Clean up the semaphore when the main config is freed. More... | |
int | main_config_free (main_config_t **config) |
void | main_config_hup (main_config_t *config) |
int | main_config_init (main_config_t *config) |
bool | main_config_migrate_option_get (char const *name) |
void | main_config_name_set_default (main_config_t *config, char const *name, bool overwrite_config) |
Set the server name. More... | |
int | main_config_parse_option (char const *value) |
void | main_config_raddb_dir_set (main_config_t *config, char const *name) |
Set the global radius config directory. More... | |
static int | max_request_time_parse (TALLOC_CTX *ctx, void *out, void *parent, CONF_ITEM *ci, conf_parser_t const *rule) |
static int | name_parse (TALLOC_CTX *ctx, void *out, void *parent, CONF_ITEM *ci, conf_parser_t const *rule) |
Configured server name takes precedence over default values. More... | |
static int | num_networks_parse (TALLOC_CTX *ctx, void *out, void *parent, CONF_ITEM *ci, conf_parser_t const *rule) |
static uint32_t | num_workers_auto (main_config_t *conf, CONF_ITEM *parent) |
static int | num_workers_dflt (CONF_PAIR **out, void *parent, CONF_SECTION *cs, fr_token_t quote, conf_parser_t const *rule) |
static int | num_workers_parse (TALLOC_CTX *ctx, void *out, void *parent, CONF_ITEM *ci, conf_parser_t const *rule) |
static int | reverse_lookups_parse (TALLOC_CTX *ctx, void *out, void *parent, CONF_ITEM *ci, conf_parser_t const *rule) |
static int | talloc_pool_size_parse (TALLOC_CTX *ctx, void *out, void *parent, CONF_ITEM *ci, conf_parser_t const *rule) |
static xlat_action_t | xlat_config (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *in) |
xlat to get config values More... | |
static int | xlat_config_escape (UNUSED request_t *request, fr_value_box_t *vb, UNUSED void *uctx) |
Variables | |
static fr_table_num_ordered_t | config_arg_table [] |
static size_t | config_arg_table_len = NUM_ELEMENTS(config_arg_table) |
fr_log_t | debug_log = { .fd = -1, .dst = L_DST_NULL } |
static const conf_parser_t | initial_log_config [] |
static const conf_parser_t | initial_server_config [] |
static const conf_parser_t | interpret_config [] |
static const conf_parser_t | lib_dir_on_read_config [] |
static const conf_parser_t | log_config [] |
main_config_t const * | main_config |
Main server configuration. More... | |
static const conf_parser_t | migrate_config [] |
static const conf_parser_t | resources [] |
static const conf_parser_t | security_config [] |
static const conf_parser_t | server_config [] |
static const conf_parser_t | switch_users_config [] |
static const conf_parser_t | thread_config [] |
bool | tmpl_require_enum_prefix |
static xlat_arg_parser_t const | xlat_config_args [] |
Handle the the main server's (radiusd) configuration.
Definition in file main_config.c.
|
static |
|
static |
void hup_logfile | ( | main_config_t * | config | ) |
Definition at line 1447 of file main_config.c.
|
static |
main_config_t* main_config_alloc | ( | TALLOC_CTX * | ctx | ) |
Allocate a main_config_t struct, setting defaults.
Definition at line 1003 of file main_config.c.
void main_config_dict_dir_set | ( | main_config_t * | config, |
char const * | name | ||
) |
Set the global dictionary directory.
[in] | config | to alter. |
[in] | name | to set as dict dir root e.g. /usr/local/share/freeradius. |
Definition at line 991 of file main_config.c.
int main_config_exclusive_proc | ( | main_config_t * | config | ) |
Check to see if we're the only process using this configuration file (or PID file if specified)
[in] | config | specifying the path to the main config file. |
Definition at line 916 of file main_config.c.
int main_config_exclusive_proc_child | ( | UNUSED main_config_t const * | config | ) |
Increment the semaphore in the child process so that it's not released when the parent exits.
[in] | config | specifying the path to the main config file. |
Definition at line 895 of file main_config.c.
void main_config_exclusive_proc_done | ( | UNUSED main_config_t const * | config | ) |
Clean up the semaphore when the main config is freed.
This helps with permissions issues if the user is switching between running the process under something like systemd and running it under debug mode.
Definition at line 877 of file main_config.c.
int main_config_free | ( | main_config_t ** | config | ) |
Definition at line 1423 of file main_config.c.
void main_config_hup | ( | main_config_t * | config | ) |
Definition at line 1469 of file main_config.c.
int main_config_init | ( | main_config_t * | config | ) |
Definition at line 1036 of file main_config.c.
bool main_config_migrate_option_get | ( | char const * | name | ) |
void main_config_name_set_default | ( | main_config_t * | config, |
char const * | name, | ||
bool | overwrite_config | ||
) |
Set the server name.
[in] | config | to alter. |
[in] | name | to set e.g. "radiusd". |
[in] | overwrite_config | replace any CONF_PAIRs with this value. |
Definition at line 843 of file main_config.c.
int main_config_parse_option | ( | char const * | value | ) |
Definition at line 1511 of file main_config.c.
void main_config_raddb_dir_set | ( | main_config_t * | config, |
char const * | name | ||
) |
Set the global radius config directory.
[in] | config | to alter. |
[in] | name | to set as dir root e.g. /usr/local/etc/raddb. |
Definition at line 862 of file main_config.c.
|
static |
|
static |
Configured server name takes precedence over default values.
Definition at line 396 of file main_config.c.
|
static |
|
inlinestatic |
Definition at line 428 of file main_config.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 1497 of file main_config.c.
|
static |
Definition at line 1502 of file main_config.c.
fr_log_t debug_log = { .fd = -1, .dst = L_DST_NULL } |
Definition at line 73 of file main_config.c.
|
static |
Definition at line 105 of file main_config.c.
|
static |
Definition at line 124 of file main_config.c.
|
static |
Definition at line 204 of file main_config.c.
|
static |
Definition at line 133 of file main_config.c.
|
static |
Definition at line 151 of file main_config.c.
main_config_t const* main_config |
Main server configuration.
Global configuration singleton.
Definition at line 69 of file main_config.c.
|
static |
Definition at line 192 of file main_config.c.
|
static |
Definition at line 160 of file main_config.c.
|
static |
Definition at line 264 of file main_config.c.
|
static |
Definition at line 211 of file main_config.c.
|
static |
Definition at line 283 of file main_config.c.
|
static |
Definition at line 171 of file main_config.c.
|
extern |
Definition at line 49 of file tmpl_tokenize.c.
|
static |
Definition at line 554 of file main_config.c.