26RCSIDH(cf_file_h,
"$Id: 6253120b2d3966a1c3efa25fe3819986867d44e5 $")
31#include <freeradius-devel/server/cf_util.h>
33#include <freeradius-devel/util/rb.h>
34#include <freeradius-devel/util/syserror.h>
35#include <freeradius-devel/util/table.h>
36#include <freeradius-devel/util/print.h>
85 char *output,
size_t outsize,
int cf_file_read(CONF_SECTION *cs, char const *file)
void cf_section_set_unlang(CONF_SECTION *cs)
cf_file_check_err_t cf_file_check_unix_perm(char const *filename, UNUSED void *uctx)
Check if file exists, and is a socket.
int cf_section_write(FILE *fp, CONF_SECTION *cs, int depth)
int cf_section_pass2(CONF_SECTION *cs)
cf_file_check_err_t
Results of file checks.
@ CF_FILE_OK
File checks passed.
@ CF_FILE_NO_PERMISSION
Requested permissions not set.
@ CF_FILE_NO_UNIX_SOCKET
File is not a unix socket.
@ CF_FILE_OTHER_ERROR
Other error occurred checking permissions.
@ CF_FILE_NO_EXIST
File does not exist.
cf_file_check_err_t cf_file_check(CONF_PAIR *cp, bool check_perms)
Do some checks on the file as an "input" 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)
CONF_ITEM * cf_reference_item(CONF_SECTION const *parentcs, CONF_SECTION const *outercs, char const *ptr)
cf_file_check_err_t cf_file_check_open_read(char const *filename, void *uctx)
Callback for cf_file_check to open a file and check permissions.
cf_file_check_err_t cf_file_check_effective(char const *filename, cf_file_check_err_t(*cb)(char const *filename, void *uctx), void *uctx)
Perform an operation with the effect/group set to conf_check_gid and conf_check_uid.
void cf_file_check_set_uid_gid(uid_t uid, gid_t gid)
Set the euid/egid used when performing file checks.
void cf_md5_final(uint8_t *digest)
void cf_file_free(CONF_SECTION *cs)
cf_file_check_err_t cf_file_check_unix_connect(char const *filename, UNUSED void *uctx)
Check if we can connect to a unix socket.
Common header for all CONF_* types.
Configuration AVP similar to a fr_pair_t.
A section grouping multiple CONF_PAIR.
static uint8_t depth(fr_minmax_heap_index_t i)
static size_t char fr_sbuff_t size_t inlen