From: Alan T. DeKok Date: Mon, 26 Jan 2026 18:52:58 +0000 (-0500) Subject: regularize raddbdir -> confdir some more X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70f3d211e61c643fa3070eb60f8bf58285b667ab;p=thirdparty%2Ffreeradius-server.git regularize raddbdir -> confdir some more --- diff --git a/src/bin/checkrad.in b/src/bin/checkrad.in index 3bdbda3fa07..50685f34c11 100644 --- a/src/bin/checkrad.in +++ b/src/bin/checkrad.in @@ -100,7 +100,7 @@ BEGIN { }; # -# Get password from /etc/raddb/naspasswd file. +# Get password from naspasswd file. # Returns (login, password). # sub naspasswd { @@ -679,7 +679,7 @@ sub portslave_finger { # See if the user is already logged-in at the 3Com/USR Total Control. # (this routine by Alexis C. Villalon ). # You must have the Net::Telnet module from CPAN for this to work. -# You must also have your /etc/raddb/naspasswd made up. +# You must also have your naspasswd made up. # sub tc_tccheck { # diff --git a/src/bin/radiusd.c b/src/bin/radiusd.c index c97844b7e3f..ff3ef268b58 100644 --- a/src/bin/radiusd.c +++ b/src/bin/radiusd.c @@ -1212,7 +1212,7 @@ static NEVER_RETURNS void usage(int status) fprintf(output, "Usage: %s [options]\n", program); fprintf(output, "Options:\n"); fprintf(output, " -C Check configuration and exit.\n"); - fprintf(stderr, " -d Set configuration directory (defaults to " CONFDIR ").\n"); + fprintf(stderr, " -d Configuration file directory (defaults to " CONFDIR ").\n"); fprintf(stderr, " -D Set main dictionary directory (defaults to " DICTDIR ").\n"); #ifndef NDEBUG fprintf(output, " -e Exit after the specified number of seconds. Useful for diagnosing \"crash-on-exit\" issues.\n"); @@ -1223,7 +1223,7 @@ static NEVER_RETURNS void usage(int status) #ifndef NDEBUG fprintf(output, " -L When running in memory debug mode, set a hard limit on talloced memory\n"); #endif - fprintf(output, " -n Read raddb/name.conf instead of raddb/%s.conf.\n", program); + fprintf(output, " -n Read ${confdir}/name.conf instead of ${confdir}/%s.conf.\n", program); fprintf(output, " -m Allow multiple processes reading the same %s.conf to exist simultaneously.\n", program); #ifndef NDEBUG fprintf(output, " -M Enable talloc memory debugging, and issue a memory report when the server terminates\n"); diff --git a/src/bin/unit_test_module.c b/src/bin/unit_test_module.c index 771c1485ef0..269abf3278f 100644 --- a/src/bin/unit_test_module.c +++ b/src/bin/unit_test_module.c @@ -1354,7 +1354,7 @@ static NEVER_RETURNS void usage(main_config_t const *config, int status) fprintf(output, "Usage: %s [options]\n", config->name); fprintf(output, "Options:\n"); fprintf(output, " -c Run packets through the interpreter times\n"); - fprintf(output, " -d Configuration files are in \"confdir/*\".\n"); + fprintf(output, " -d Configuration file directory. (defaults to " CONFDIR ")."); fprintf(output, " -D Dictionary files are in \"dict_dir/*\".\n"); fprintf(output, " -f Filter reply against attributes in 'file'.\n"); fprintf(output, " -h Print this help message.\n"); diff --git a/src/include/build-radpaths-h.in b/src/include/build-radpaths-h.in index 042884b316a..a0009d266cf 100644 --- a/src/include/build-radpaths-h.in +++ b/src/include/build-radpaths-h.in @@ -28,7 +28,7 @@ cat < radpaths.h /* Automatically generated by "build-radpaths-h" */ #define LOGDIR "@logdir@" #define LIBDIR "@libdir@" -#define CONFDIR "@raddbdir@" +#define CONFDIR "@raddbdir@" #define RUNDIR "@localstatedir@/run" #define SBINDIR "@sbindir@" #define RADIR "@radacctdir@" diff --git a/src/lib/server/base.c b/src/lib/server/base.c index 7c5a7880cdd..a1a448030b1 100644 --- a/src/lib/server/base.c +++ b/src/lib/server/base.c @@ -33,13 +33,13 @@ RCSID("$Id$") * This is just so that the callers don't need to call a million functions. * * @param[in] cs The root configuration section. - * @param[in] dict_dir The path to the raddb directory. + * @param[in] conf_dir The path to the main configuration directory. * @param[in] dict the main dictionary, usually the internal dictionary. * @return * - 0 on success. * - -1 on failure. */ -int server_init(CONF_SECTION *cs, char const *dict_dir, fr_dict_t *dict) +int server_init(CONF_SECTION *cs, char const *conf_dir, fr_dict_t *dict) { /* * Initialize the dictionary attributes needed by the tmpl code. @@ -83,12 +83,12 @@ int server_init(CONF_SECTION *cs, char const *dict_dir, fr_dict_t *dict) * have created any attributes they need to, so that we can define * additional protocol attributes, and add */ - switch (fr_dict_read(dict, dict_dir, FR_DICTIONARY_FILE)) { + switch (fr_dict_read(dict, conf_dir, FR_DICTIONARY_FILE)) { case -1: PERROR("Failed reading site-local dictionary"); return -1; case 0: - DEBUG2("Including dictionary file \"%s/%s\"", dict_dir, FR_DICTIONARY_FILE); + DEBUG2("Including dictionary file \"%s/%s\"", conf_dir, FR_DICTIONARY_FILE); break; default: diff --git a/src/lib/server/main_config.c b/src/lib/server/main_config.c index 109dbdcb53d..ed4bf1ddeb9 100644 --- a/src/lib/server/main_config.c +++ b/src/lib/server/main_config.c @@ -827,7 +827,7 @@ void main_config_name_set_default(main_config_t *config, char const *name, bool /** Set the global radius config directory. * * @param[in] config to alter. - * @param[in] name to set as dir root e.g. /usr/local/etc/raddb. + * @param[in] name to set as main configuration directory. */ void main_config_confdir_set(main_config_t *config, char const *name) { diff --git a/src/lib/server/main_config.h b/src/lib/server/main_config.h index 3a1b9b15ad1..d7baba5ca00 100644 --- a/src/lib/server/main_config.h +++ b/src/lib/server/main_config.h @@ -73,7 +73,7 @@ struct main_config_s { char const *lib_dir; char const *sbin_dir; char const *run_dir; - char const *confdir; //!< Path to raddb directory + char const *confdir; //!< Path to configuration directory char const *prefix; diff --git a/src/lib/server/trigger.c b/src/lib/server/trigger.c index 9df87034bdd..ef2b96d116a 100644 --- a/src/lib/server/trigger.c +++ b/src/lib/server/trigger.c @@ -107,7 +107,7 @@ typedef struct { /** Execute a trigger - call an executable to process an event * * A trigger ties a state change (e.g. connection up) in a module to an action - * (e.g. send an SNMP trap) defined in raddb/triggers.conf or in the trigger + * (e.g. send an SNMP trap) defined in triggers.conf or in the trigger * section of a module. There's no setup for triggers, the triggering code * just calls this function with the name of the trigger to run, and an optional * interpreter if the trigger should run asynchronously. diff --git a/src/lib/util/paths.c b/src/lib/util/paths.c index d32cdbf5cbd..c25266df7a3 100644 --- a/src/lib/util/paths.c +++ b/src/lib/util/paths.c @@ -45,7 +45,7 @@ char const *fr_path_default_lib_dir(void) return LIBDIR; } -/** Return the default raddb dir +/** Return the default configuration dir * * This is set at build time from --prefix * @return the value of CONFDIR diff --git a/src/listen/control/radmin.c b/src/listen/control/radmin.c index 3f1572d3df0..12926f661ef 100644 --- a/src/listen/control/radmin.c +++ b/src/listen/control/radmin.c @@ -164,7 +164,7 @@ static NEVER_RETURNS void usage(int status) { FILE *output = status ? stderr : stdout; fprintf(output, "Usage: %s [ args ]\n", progname); - fprintf(output, " -d confdir Configuration files are in \"raddbdir/*\".\n"); + fprintf(output, " -d Configuration file directory. (defaults to " CONFDIR ")."); fprintf(output, " -D Set main dictionary directory (defaults to " DICTDIR ").\n"); fprintf(output, " -e command Execute 'command' and then exit.\n"); fprintf(output, " -E Echo commands as they are being executed.\n"); @@ -172,7 +172,7 @@ static NEVER_RETURNS void usage(int status) fprintf(output, " -h Print usage help information.\n"); fprintf(output, " -i input_file Read commands from 'input_file'.\n"); fprintf(output, " -l Commands which are executed will be written to this file.\n"); - fprintf(output, " -n name Read raddb/name.conf instead of raddb/radiusd.conf\n"); + fprintf(output, " -n name Read ${confdir}/name.conf instead of ${confdir}/radiusd.conf\n"); fprintf(output, " -q Reduce output verbosity\n"); fprintf(output, " -s Look in named server for name of control socket.\n"); fprintf(output, " -S Use argument as shared secret for authentication to the server.\n"); @@ -379,7 +379,7 @@ static int do_connect(int *out, char const *file, char const *server) fr_perror("radmin"); if (errno == ENOENT) { fprintf(stderr, "Perhaps you need to run the commands:"); - fprintf(stderr, "\tcd /etc/raddb\n"); + fprintf(stderr, "\tcd " CONFDIR "\n"); fprintf(stderr, "\tln -s sites-available/control-socket " "sites-enabled/control-socket\n"); fprintf(stderr, "and then re-start the server?\n"); diff --git a/src/modules/rlm_securid/README.md b/src/modules/rlm_securid/README.md index c4fb951dac7..252b2c8b12a 100644 --- a/src/modules/rlm_securid/README.md +++ b/src/modules/rlm_securid/README.md @@ -11,7 +11,7 @@ Supports authentication against an RSA SecurID ACE instance. This module implements SecurID token checking. It should be listed in the "authenticate" section. -The module configuration is in the "securid" file. You will need to copy it by hand to the raddb/modules/directory. +The module configuration is in the "securid" file. You will need to copy it by hand to the `mods-enabled/` directory. There is a configure script, but you will most likely need to pass --with-securid-dir= argument.