]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
regularize raddbdir -> confdir some more
authorAlan T. DeKok <aland@freeradius.org>
Mon, 26 Jan 2026 18:52:58 +0000 (13:52 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 26 Jan 2026 19:01:31 +0000 (14:01 -0500)
src/bin/checkrad.in
src/bin/radiusd.c
src/bin/unit_test_module.c
src/include/build-radpaths-h.in
src/lib/server/base.c
src/lib/server/main_config.c
src/lib/server/main_config.h
src/lib/server/trigger.c
src/lib/util/paths.c
src/listen/control/radmin.c
src/modules/rlm_securid/README.md

index 3bdbda3fa0711d4326c0fcf7223016e6a5c5e7b7..50685f34c1118477ced0f75cc8d33c86c356de30 100644 (file)
@@ -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 <alexisv@compass.com.ph>).
 #      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 {
        #
index c97844b7e3f41d4e49b3fdd52b318978c829d0d2..ff3ef268b5891d85b5ca9541a2448944e83e1478 100644 (file)
@@ -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 <confdir>  Set configuration directory (defaults to " CONFDIR ").\n");
+       fprintf(stderr, "  -d <confdir>  Configuration file directory (defaults to " CONFDIR ").\n");
        fprintf(stderr, "  -D <dictdir>  Set main dictionary directory (defaults to " DICTDIR ").\n");
 #ifndef NDEBUG
        fprintf(output, "  -e <seconds>  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 <size>     When running in memory debug mode, set a hard limit on talloced memory\n");
 #endif
-       fprintf(output, "  -n <name>     Read raddb/name.conf instead of raddb/%s.conf.\n", program);
+       fprintf(output, "  -n <name>     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");
index 771c1485ef0c2ef8cd0c5b33e91181ecd9e0632b..269abf3278f6263c88f3705394fb5c563deaf0e3 100644 (file)
@@ -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 <count>         Run packets through the interpreter <count> times\n");
-       fprintf(output, "  -d <confdir>       Configuration files are in \"confdir/*\".\n");
+       fprintf(output, "  -d <confdir>       Configuration file directory. (defaults to " CONFDIR ").");
        fprintf(output, "  -D <dict_dir>      Dictionary files are in \"dict_dir/*\".\n");
        fprintf(output, "  -f <file>          Filter reply against attributes in 'file'.\n");
        fprintf(output, "  -h                 Print this help message.\n");
index 042884b316a22b79d28083c9f2411298c7f9baa2..a0009d266cfc61c7715bd102dcf82fbfdcd12666 100644 (file)
@@ -28,7 +28,7 @@ cat <<EOF > 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@"
index 7c5a7880cdd7d707eff463947ebc931828ae6954..a1a448030b195609a8e9e34f0a27bd8f9106d94a 100644 (file)
@@ -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:
index 109dbdcb53dac627fd6be10097204be4c4d6dfe4..ed4bf1ddeb961e22495818c039685523fe2c9460 100644 (file)
@@ -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)
 {
index 3a1b9b15ad1b2478ff93453b0e450fa3a28fb4db..d7baba5ca0056135de1955fc9d72d64c1a0f6b4c 100644 (file)
@@ -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;
 
index 9df87034bdd8670b6a4f96601464b706b78f29ea..ef2b96d116a758a2c75a882e1703bab9a22da706 100644 (file)
@@ -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.
index d32cdbf5cbd973f33fadaef5d6fef57ec23b21ba..c25266df7a395aa5d7e349a8c87cf9eb0c6d1b3f 100644 (file)
@@ -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
index 3f1572d3df003ccaff961616bd4f80ea2993341c..12926f661ef87bfffc59f3e17abbd32333c48fdc 100644 (file)
@@ -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 <confdir>    Configuration file directory. (defaults to " CONFDIR ").");
        fprintf(output, "  -D <dictdir>    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 <log_file>   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 <server>     Look in named server for name of control socket.\n");
        fprintf(output, "  -S <secret>     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");
index c4fb951dac7a0ece39f8728f31eab301f3f4f9c0..252b2c8b12a4b40dd4e90a422b2b7616caba0067 100644 (file)
@@ -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=<securid_path> argument.