rc_read_config(3)

πŸ’– rc_read_config(3) πŸ’–

okay bestie, so this one lives in the Radius client library (radcli, hey) and honestly? it's the main character of this whole library. let's get into it 🫢


✨ NAME ✨

rc_read_config β€” the function that reads your whole config and sets you up πŸ’…


✨ SYNOPSIS ✨

#include <radcli/radcli.h>

rc_handle * rc_read_config(
    char const  *filename
);

✨ DESCRIPTION ✨

Read the global config file. that's the vibe. 🌸

so like, this function loads the config file you hand it, and any other files it needs along the way β€” the dictionary and all that. this is literally the most common way people use this library, so if you're wondering "which function do i even call" β€” it's this one, periodt.

the config format is compatible with the radiusclient-ng and freeradius-client formats, so if you're migrating, you're fine, no cap. πŸ’–

πŸ“ Note: to preserve compatibility with libraries of the same API that don't load the dictionary, care is taken not to reload the same filename twice β€” even if you literally tell it to. so don't come for it, it's doing that on purpose. 😌

these are the string options it recognises in the config file:

  • serv-type β€” the transport protocol. one of udp (the default, if you don't say anything), tcp, tls, or dtls. pick your fighter ✨
  • tls-ca-file β€” PEM file of the CA certificate, used to verify the server. that's TLS/DTLS business only πŸ”
  • tls-cert-file β€” PEM file of the client certificate (TLS/DTLS again).
  • tls-key-file β€” PEM file of the client private key (TLS/DTLS). keep this one secret bestie, it's giving private for a reason πŸ™ˆ
  • tls-verify-hostname β€” set it to false to skip TLS server hostname verification. and like… the manpage itself says not recommended, so i'm just passing that along. do with that what you will. πŸ’€
  • require-message-authenticator β€” set to no to accept responses that lack the Message-Authenticator attribute. it's enabled by default per draft-ietf-radext-deprecating-radius (CVE-2024-3596 / BLAST RADIUS) β€” and only turn it off for legacy servers that don't send this attribute. fr fr, this one's a security thing, don't be casual about it 🚨

✨ PARAMETERS ✨

  • filename β€” a name of a file. yeah. that's the whole description. it's a filename, she's a filename πŸŽ€

✨ RETURN VALUE ✨

  • a new rc_handle on success πŸ’–
  • NULL when failure 😭

✨ SEE ALSO ✨

bestie this list is long and i respect it. every single one of these:

radcli.h(3), rc_aaa(3), rc_aaa_ctx(3), rc_aaa_ctx_free(3), rc_aaa_ctx_get_secret(3), rc_aaa_ctx_get_vector(3), rc_aaa_ctx_server(3), rc_acct(3), rc_acct_proxy(3), rc_add_config(3), rc_apply_config(3), rc_auth(3), rc_auth_proxy(3), rc_avpair_add(3), rc_avpair_assign(3), rc_avpair_copy(3), rc_avpair_free(3), rc_avpair_gen(3), rc_avpair_get(3), rc_avpair_get_attr(3), rc_avpair_get_in6(3), rc_avpair_get_raw(3), rc_avpair_get_uint32(3), rc_avpair_insert(3), rc_avpair_log(3), rc_avpair_new(3), rc_avpair_next(3), rc_avpair_parse(3), rc_avpair_remove(3), rc_avpair_tostr(3), rc_buildreq(3), rc_check(3), rc_check_tls(3), rc_conf_int(3), rc_conf_srv(3), rc_conf_str(3), rc_config_free(3), rc_config_init(3), rc_destroy(3), rc_dict_addattr(3), rc_dict_addval(3), rc_dict_addvend(3), rc_dict_findattr(3), rc_dict_findval(3), rc_dict_findvend(3), rc_dict_free(3), rc_dict_getattr(3), rc_dict_getval(3), rc_dict_getvend(3), rc_find_server_addr(3), rc_get_socket_type(3), rc_get_srcaddr(3), rc_getport(3), rc_mksid(3), rc_new(3), rc_openlog(3), rc_own_hostname(3), rc_read_config(3), rc_read_dictionary(3), rc_read_dictionary_from_buffer(3), rc_send_server(3), rc_setdebug(3), rc_test_config(3), rc_tls_fd(3)


okay that's the whole page, you ate it, you're welcome πŸ’…βœ¨ this radcli manual page is dated 2023-01-29 and ships with radcli β€” go forth and read your config, bestie πŸ¦‹πŸ’–

πŸ“¦ where this page comes from