26 RCSIDH(util_h,
"$Id: 7c0485d583037ba0f103059322d4038ee75e96fd $")
34 #include <freeradius-devel/util/talloc.h>
44 char *
rad_ajoin(TALLOC_CTX *ctx,
char const **argv,
int argc,
char c);
48 int max_argc,
char const *argv[],
bool can_fail,
49 size_t argv_buflen,
char *argv_buf);
ssize_t rad_filename_make_safe(UNUSED request_t *request, char *out, size_t outlen, char const *in, UNUSED void *arg)
Ensures that a filename cannot walk up the directory structure.
bool rad_suid_is_down_permanent(void)
Return whether we've permanently dropped root privileges.
void(*)(int) reset_signal(int signo, void(*func)(int))
int rad_segid(gid_t gid)
Alter the effective user id.
uint32_t rad_pps(uint32_t *past, uint32_t *present, time_t *then, struct timeval *now)
int rad_filename_box_escape(fr_value_box_t *vb, UNUSED void *uxtc)
char * rad_ajoin(TALLOC_CTX *ctx, char const **argv, int argc, char c)
talloc a buffer to hold the concatenated value of all elements of argv
ssize_t rad_filename_unescape(char *out, size_t outlen, char const *in, size_t inlen)
Converts data stored in a file name back to its original form.
int rad_filename_box_make_safe(fr_value_box_t *vb, UNUSED void *uxtc)
int rad_expand_xlat(request_t *request, char const *cmd, int max_argc, char const *argv[], bool can_fail, size_t argv_buflen, char *argv_buf)
Split string into words and expand each one.
ssize_t rad_filename_escape(UNUSED request_t *request, char *out, size_t outlen, char const *in, UNUSED void *arg)
Escapes the raw string such that it should be safe to use as part of a file path.
void rad_suid_down_permanent(void)
int rad_seuid(uid_t uid)
Alter the effective user id.
void rad_suid_set_down_uid(uid_t uid)
static size_t char fr_sbuff_t size_t inlen
static size_t char ** out