Parse on-disk text based config files into the FreeRADIUS internal format.
More...
#include <stddef.h>
#include <stdint.h>
#include <freeradius-devel/server/cf_util.h>
#include <freeradius-devel/util/rb.h>
#include <freeradius-devel/util/syserror.h>
#include <freeradius-devel/util/table.h>
#include <freeradius-devel/util/print.h>
Go to the source code of this file.
|
char const * | cf_expand_variables (char const *filename, int lineno, CONF_SECTION *outer_cs, char *output, size_t outsize, char const *input, ssize_t inlen, bool *soft_fail) |
|
bool | cf_file_check (CONF_PAIR *cp, bool check_perms) |
| Do some checks on the file as an "input" file. More...
|
|
void | cf_file_check_user (uid_t uid, gid_t gid) |
| Set the euid/egid used when performing file checks. More...
|
|
void | cf_file_free (CONF_SECTION *cs) |
|
int | cf_file_read (CONF_SECTION *cs, char const *file) |
|
void | cf_md5_final (uint8_t *digest) |
|
void | cf_md5_init (void) |
|
CONF_ITEM * | cf_reference_item (CONF_SECTION const *parentcs, CONF_SECTION const *outercs, char const *ptr) |
|
int | cf_section_pass2 (CONF_SECTION *cs) |
|
void | cf_section_set_unlang (CONF_SECTION *cs) |
|
int | cf_section_write (FILE *fp, CONF_SECTION *cs, int depth) |
|
Parse on-disk text based config files into the FreeRADIUS internal format.
- Id
- 3fd9fce54853c2297bdd76009c3a82c067c41a7c
- Copyright
- 2017 The FreeRADIUS server project
Definition in file cf_file.h.
◆ cf_expand_variables()
char const* cf_expand_variables |
( |
char const * |
filename, |
|
|
int |
lineno, |
|
|
CONF_SECTION * |
outer_cs, |
|
|
char * |
output, |
|
|
size_t |
outsize, |
|
|
char const * |
input, |
|
|
ssize_t |
inlen, |
|
|
bool * |
soft_fail |
|
) |
| |
◆ cf_file_check()
Do some checks on the file as an "input" file.
i.e. one read by a module.
- Note
- Must be called with super user privileges.
- Parameters
-
cp | currently being processed. |
check_perms | If true - will return false if file is world readable, or not readable by the unprivileged user/group. |
- Returns
- true if permissions are OK, or the file exists.
- false if the file does not exist or the permissions are incorrect.
Definition at line 656 of file cf_file.c.
◆ cf_file_check_user()
void cf_file_check_user |
( |
uid_t |
uid, |
|
|
gid_t |
gid |
|
) |
| |
Set the euid/egid used when performing file checks.
Sets the euid, and egid used when cf_file_check is called to check permissions on conf items of type CONF_FLAG_FILE_INPUT
- Note
- This is probably only useful for the freeradius daemon itself.
- Parameters
-
uid | to set, (uid_t)-1 to use current euid. |
gid | to set, (gid_t)-1 to use current egid. |
Definition at line 3489 of file cf_file.c.
◆ cf_file_free()
◆ cf_file_read()
◆ cf_md5_final()
void cf_md5_final |
( |
uint8_t * |
digest | ) |
|
◆ cf_md5_init()
void cf_md5_init |
( |
void |
| ) |
|
◆ cf_reference_item()
◆ cf_section_pass2()
◆ cf_section_set_unlang()
◆ cf_section_write()
int cf_section_write |
( |
FILE * |
fp, |
|
|
CONF_SECTION * |
cs, |
|
|
int |
depth |
|
) |
| |