From: Alan T. DeKok Date: Wed, 28 Jan 2026 17:09:47 +0000 (-0500) Subject: move $(raddbir) to $(confdir) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50983041deb19a176a52ab30ae13670f66edd0c6;p=thirdparty%2Ffreeradius-server.git move $(raddbir) to $(confdir) and ${raddb} in tests to ${raddbdir} and ${maindir} in tests to ${raddb}, because "confdir" is set automatically from '-d foo', and we still need to load the main configuration files from the top-level "raddb" directory. --- diff --git a/Make.inc.in b/Make.inc.in index ac212d4a913..722ab9d4ca6 100644 --- a/Make.inc.in +++ b/Make.inc.in @@ -20,8 +20,8 @@ mibdir = @mibdir@ logdir = @logdir@ includedir = @includedir@ -raddbdir = @raddbdir@ -modconfdir = @modconfdir@ +confdir = @confdir@ +modconfdir = ${confdir}/mods-config radacctdir = @radacctdir@ top_builddir = @abs_top_builddir@ top_build_prefix=@abs_top_builddir@/ @@ -119,7 +119,7 @@ LIBS = $(OPENSSL_LIBS) $(TALLOC_LIBS) $(KQUEUE_LIBS) @LIBS@ LDFLAGS = $(OPENSSL_LDFLAGS) $(TALLOC_LDFLAGS) $(KQUEUE_LDFLAGS) @LDFLAGS@ LOGDIR = ${logdir} -CONFDIR = ${raddbdir} +CONFDIR = ${confdir} RUNDIR = ${localstatedir}/run/radiusd SBINDIR = ${sbindir} RADIR = ${radacctdir} diff --git a/Makefile b/Makefile index 615315c7e5f..188387371ec 100644 --- a/Makefile +++ b/Makefile @@ -241,7 +241,7 @@ install.man: $(subst man/,$(R)$(mandir)/,$(MANFILES)) $(R)$(mandir)/%: man/% @echo INSTALL $(notdir $<) - @sed -e "s,/etc/raddb,$(raddbdir),g" \ + @sed -e "s,/etc/raddb,$(confdir),g" \ -e "s,/usr/local/share,$(datarootdir),g" \ $< > $<.subst @$(INSTALL) -m 644 $<.subst $@ @@ -260,10 +260,10 @@ ifneq ($(RADMIN),) ifneq ($(RGROUP),) .PHONY: install-chown install-chown: - chown -R $(RADMIN) $(R)$(raddbdir) - chgrp -R $(RGROUP) $(R)$(raddbdir) - chmod u=rwx,g=rx,o= `find $(R)$(raddbdir) -type d -print` - chmod u=rw,g=r,o= `find $(R)$(raddbdir) -type f -print` + chown -R $(RADMIN) $(R)$(confdir) + chgrp -R $(RGROUP) $(R)$(confdir) + chmod u=rwx,g=rx,o= `find $(R)$(confdir) -type d -print` + chmod u=rw,g=r,o= `find $(R)$(confdir) -type f -print` chown -R $(RADMIN) $(R)$(logdir) chgrp -R $(RGROUP) $(R)$(logdir) find $(R)$(logdir) -type d -exec chmod u=rwx,g=rwx,o= {} \; diff --git a/configure b/configure index 72421dddd7b..91f6ae81c21 100755 --- a/configure +++ b/configure @@ -678,10 +678,9 @@ ACLOCAL RUSERS SNMPWALK SNMPGET -modconfdir mibdir dictdir -raddbdir +confdir radacctdir logdir openssl_version_check_config @@ -6219,7 +6218,7 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $radacctdir" >&5 printf "%s\n" "$radacctdir" >&6; } -raddbdir='${sysconfdir}/raddb' +confdir='${sysconfdir}/raddb' { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking raddbdir" >&5 printf %s "checking raddbdir... " >&6; } @@ -6233,7 +6232,7 @@ then : yes) ;; [\\/$]* | ?:[\\/]* ) - raddbdir="$withval" + confdir="$withval" ;; *) as_fn_error $? "expected an absolute directory name for --with-raddbdir: $withval" "$LINENO" 5 @@ -6243,8 +6242,8 @@ then : fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $raddbdir" >&5 -printf "%s\n" "$raddbdir" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $confdir" >&5 +printf "%s\n" "$confdir" >&6; } dictdir='${datarootdir}/freeradius/dictionary' { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dictdir" >&5 @@ -6300,8 +6299,6 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $mibdir" >&5 printf "%s\n" "$mibdir" >&6; } -modconfdir='${raddbdir}/mods-config' - diff --git a/configure.ac b/configure.ac index 9906ca8e343..d5cb779cec5 100644 --- a/configure.ac +++ b/configure.ac @@ -740,7 +740,7 @@ AC_MSG_RESULT($radacctdir) dnl # dnl # extra argument: --with-raddbdir dnl # -raddbdir='${sysconfdir}/raddb' +confdir='${sysconfdir}/raddb' AC_MSG_CHECKING(raddbdir) AC_ARG_WITH(raddbdir, [ --with-raddbdir=DIR directory for config files [SYSCONFDIR/raddb] ], @@ -751,15 +751,15 @@ AC_ARG_WITH(raddbdir, yes) ;; [[\\/$]]* | ?:[[\\/]]* ) - raddbdir="$withval" + confdir="$withval" ;; *) AC_MSG_ERROR([expected an absolute directory name for --with-raddbdir: $withval]) ;; esac ] ) -AC_SUBST(raddbdir) -AC_MSG_RESULT($raddbdir) +AC_SUBST(confdir) +AC_MSG_RESULT($confdir) dnl # dnl # extra argument: --with-dictdir @@ -809,9 +809,6 @@ AC_ARG_WITH(mibdir, AC_SUBST(mibdir) AC_MSG_RESULT($mibdir) -modconfdir='${raddbdir}/mods-config' -AC_SUBST(modconfdir) - dnl ############################################################# dnl # dnl # 0e. Library/include paths diff --git a/debian/patches/radiusd-to-freeradius.diff b/debian/patches/radiusd-to-freeradius.diff index d2feaf61bbd..c43b16649ce 100644 --- a/debian/patches/radiusd-to-freeradius.diff +++ b/debian/patches/radiusd-to-freeradius.diff @@ -5,7 +5,7 @@ Index: freeradius-server/Make.inc.in @@ -105,7 +105,7 @@ LDFLAGS = $(OPENSSL_LDFLAGS) $(TALLOC_L LOGDIR = ${logdir} - CONFDIR = ${raddbdir} + CONFDIR = $(confdir) -RUNDIR = ${localstatedir}/run/radiusd +RUNDIR = ${localstatedir}/run/freeradius SBINDIR = ${sbindir} diff --git a/debian/rules b/debian/rules index a5e6abff9d2..9e5c3f1669b 100755 --- a/debian/rules +++ b/debian/rules @@ -27,7 +27,7 @@ mandir = /usr/share/man libdir = /usr/lib/$(package) logdir = /var/log/$(package) pkgdocdir = /usr/share/doc/$(package) -raddbdir = /etc/$(package) +confdir = /etc/$(package) modulelist=krb5 ldap redis rest yubikey sqldriverlist=freetds mysql unixodbc postgresql @@ -99,7 +99,7 @@ endif --libdir=$(libdir) \ --datadir=/usr/share \ --localstatedir=/var \ - --with-raddbdir=$(raddbdir) \ + --with-raddbdir=$(confdir) \ --with-logdir=/var/log/$(package) \ --with-large-files \ --with-udpfromto \ diff --git a/doc/antora/modules/reference/pages/raddb/radiusd.conf.adoc b/doc/antora/modules/reference/pages/raddb/radiusd.conf.adoc index 1f46c385571..afe41e6e9af 100644 --- a/doc/antora/modules/reference/pages/raddb/radiusd.conf.adoc +++ b/doc/antora/modules/reference/pages/raddb/radiusd.conf.adoc @@ -598,7 +598,7 @@ removed (and made into errors!) in the final release. Some of these flags can also be passed on the command line as `-S flag=value`. -Dictionary migration instructions can be found in `${raddbdir}/dictionary`. +Dictionary migration instructions can be found in `${confdir}/dictionary`. @@ -710,10 +710,9 @@ sysconfdir = ${prefix}/etc localstatedir = ${prefix}/var sbindir = ${exec_prefix}/sbin logdir = ${localstatedir}/log/radius -raddbdir = ${sysconfdir}/raddb +confdir = ${sysconfdir}/raddb radacctdir = ${logdir}/radacct name = radiusd -confdir = ${raddbdir} modconfdir = ${confdir}/mods-config certdir = ${confdir}/certs cadir = ${confdir}/certs @@ -722,7 +721,7 @@ db_dir = ${localstatedir}/lib/${name} libdir = ${exec_prefix}/lib pidfile = ${run_dir}/${name}.pid #panic_action = "gdb %e %p" -#panic_action = "gdb -silent -x ${raddbdir}/panic.gdb %e %p 2>&1 | tee ${logdir}/gdb-${name}-%p.log" +#panic_action = "gdb -silent -x ${confdir}/panic.gdb %e %p 2>&1 | tee ${logdir}/gdb-${name}-%p.log" request { max = 16384 timeout = 30 @@ -757,7 +756,7 @@ log debug { ENV { # FOO = '/bar/baz' # BAR -# KRB5_CLIENT_KTNAME = ${raddbdir}/radiusd.keytab +# KRB5_CLIENT_KTNAME = ${confdir}/radiusd.keytab # LD_PRELOAD = /path/to/library1.so # LD_PRELOAD = /path/to/library2.so } diff --git a/doc/antora/modules/reference/pages/raddb/radrelay.conf.adoc b/doc/antora/modules/reference/pages/raddb/radrelay.conf.adoc index 97875ac8970..d84b743e671 100644 --- a/doc/antora/modules/reference/pages/raddb/radrelay.conf.adoc +++ b/doc/antora/modules/reference/pages/raddb/radrelay.conf.adoc @@ -253,10 +253,9 @@ sysconfdir = ${prefix}/etc localstatedir = ${prefix}/var sbindir = ${exec_prefix}/sbin logdir = ${localstatedir}/log/radius -raddbdir = ${sysconfdir}/raddb +confdir = ${sysconfdir}/raddb radacctdir = ${logdir}/radacct name = radrelay -confdir = ${raddbdir} run_dir = ${localstatedir}/run/${name} libdir = ${exec_prefix}/lib pidfile = ${run_dir}/${name}.pid diff --git a/doc/antora/modules/tutorials/pages/variables.adoc b/doc/antora/modules/tutorials/pages/variables.adoc index 6fc169142e3..bfd152b454a 100644 --- a/doc/antora/modules/tutorials/pages/variables.adoc +++ b/doc/antora/modules/tutorials/pages/variables.adoc @@ -32,7 +32,7 @@ sysconfdir = ${prefix}/etc localstatedir = ${prefix}/var sbindir = ${exec_prefix}/sbin logdir = ${localstatedir}/log/radius -raddbdir = ${sysconfdir}/raddb +confdir = ${sysconfdir}/raddb radacctdir = ${logdir}/radacct ---- diff --git a/raddb/all.mk b/raddb/all.mk index f2c5a5d770c..13e165ff392 100644 --- a/raddb/all.mk +++ b/raddb/all.mk @@ -41,13 +41,13 @@ LOCAL_CERT_FILES := dh \ ecc/server.key \ ecc/server.pem -INSTALL_CERT_PRODUCTS := $(addprefix $(R)$(raddbdir)/certs/,$(INSTALL_CERT_FILES)) +INSTALL_CERT_PRODUCTS := $(addprefix $(R)$(confdir)/certs/,$(INSTALL_CERT_FILES)) ifeq ("$(TEST_CERTS)","yes") -INSTALL_CERT_PRODUCTS += $(addprefix $(R)$(raddbdir)/certs/,$(LOCAL_CERT_FILES)) +INSTALL_CERT_PRODUCTS += $(addprefix $(R)$(confdir)/certs/,$(LOCAL_CERT_FILES)) endif -LEGACY_LINKS := $(addprefix $(R)$(raddbdir)/,users) +LEGACY_LINKS := $(addprefix $(R)$(confdir)/,users) BUILD_RADDB := $(strip $(foreach x,install clean,$(findstring $(x),$(MAKECMDGOALS)))) ifneq "$(BUILD_RADDB)" "" @@ -56,7 +56,7 @@ RADDB_DIRS := certs mods-available mods-enabled global.d policy.d template.d \ $(patsubst raddb/%,%,$(call FIND_DIRS,raddb/mods-config)) # Installed directories -INSTALL_RADDB_DIRS := $(R)$(raddbdir)/ $(addprefix $(R)$(raddbdir)/,$(RADDB_DIRS)) +INSTALL_RADDB_DIRS := $(R)$(confdir)/ $(addprefix $(R)$(confdir)/,$(RADDB_DIRS)) # Grab files from the various subdirectories INSTALL_FILES := $(wildcard raddb/sites-available/* raddb/mods-available/*) \ @@ -68,7 +68,7 @@ INSTALL_FILES := $(wildcard raddb/sites-available/* raddb/mods-available/*) \ $(call FIND_FILES,raddb/template.d) # Re-write local files to installed files, filtering out editor backups -INSTALL_RADDB := $(patsubst raddb/%,$(R)$(raddbdir)/%,$(INSTALL_FILES)) +INSTALL_RADDB := $(patsubst raddb/%,$(R)$(confdir)/%,$(INSTALL_FILES)) endif all: build.raddb @@ -97,7 +97,7 @@ raddb/sites-enabled/%: raddb/sites-available/% | raddb/sites-enabled ifneq "$(BUILD_RADDB)" "" # Installation rules for directories. Note permissions are 750! $(INSTALL_RADDB_DIRS): - ${Q}echo INSTALL $(patsubst $(R)$(raddbdir)%,raddb%,$@) + ${Q}echo INSTALL $(patsubst $(R)$(confdir)%,raddb%,$@) ${Q}$(INSTALL) -d -m 750 $@ # The installed files have ORDER dependencies. This means that they @@ -107,32 +107,32 @@ $(INSTALL_RADDB_DIRS): # This dependency lets us install the server on top of an existing # system, hopefully without breaking anything. -ifeq "$(wildcard $(R)$(raddbdir)/mods-available/)" "" -INSTALL_RADDB += $(patsubst raddb/%,$(R)$(raddbdir)/%,\ +ifeq "$(wildcard $(R)$(confdir)/mods-available/)" "" +INSTALL_RADDB += $(patsubst raddb/%,$(R)$(confdir)/%,\ $(filter-out %~,$(LOCAL_MODULES))) # Installation rules for mods-enabled. Note ORDER dependencies -$(R)$(raddbdir)/mods-enabled/%: | $(R)$(raddbdir)/mods-available/% +$(R)$(confdir)/mods-enabled/%: | $(R)$(confdir)/mods-available/% ${Q}cd $(dir $@) && ln -sf ../mods-available/$(notdir $@) endif -ifeq "$(wildcard $(R)$(raddbdir)/sites-available/)" "" -INSTALL_RADDB += $(patsubst raddb/%,$(R)$(raddbdir)/%,\ +ifeq "$(wildcard $(R)$(confdir)/sites-available/)" "" +INSTALL_RADDB += $(patsubst raddb/%,$(R)$(confdir)/%,\ $(filter-out %~,$(LOCAL_SITES))) # Installation rules for sites-enabled. Note ORDER dependencies -$(R)$(raddbdir)/sites-enabled/%: | $(R)$(raddbdir)/sites-available/% +$(R)$(confdir)/sites-enabled/%: | $(R)$(confdir)/sites-available/% ${Q}cd $(dir $@) && ln -sf ../sites-available/$(notdir $@) endif # Installation rules for plain modules. -$(R)$(raddbdir)/%: | raddb/% - ${Q}echo INSTALL $(patsubst $(R)$(raddbdir)/%,raddb/%,$@) - ${Q}$(INSTALL) -m 640 $(patsubst $(R)$(raddbdir)/%,raddb/%,$@) $@ +$(R)$(confdir)/%: | raddb/% + ${Q}echo INSTALL $(patsubst $(R)$(confdir)/%,raddb/%,$@) + ${Q}$(INSTALL) -m 640 $(patsubst $(R)$(confdir)/%,raddb/%,$@) $@ -$(R)$(raddbdir)/users: $(R)$(modconfdir)/files/authorize - ${Q}[ -e $@ ] || echo LN-S $(patsubst $(R)$(raddbdir)/%,raddb/%,$@) - ${Q}[ -e $@ ] || ln -s $(patsubst $(R)$(raddbdir)/%,./%,$<) $@ +$(R)$(confdir)/users: $(R)$(modconfdir)/files/authorize + ${Q}[ -e $@ ] || echo LN-S $(patsubst $(R)$(confdir)/%,raddb/%,$@) + ${Q}[ -e $@ ] || ln -s $(patsubst $(R)$(confdir)/%,./%,$<) $@ endif ifeq ("$(PACKAGE)","") @@ -173,9 +173,9 @@ endif # Install the bootstrap script so that installations can run it # to generate test certs. # -$(R)$(raddbdir)/certs/bootstrap: raddb/certs/bootstrap - ${Q}echo INSTALL $(patsubst $(R)$(raddbdir)/%,raddb/%,$@) - ${Q}$(INSTALL) -m 750 $(patsubst $(R)$(raddbdir)/%,raddb/%,$@) $@ +$(R)$(confdir)/certs/bootstrap: raddb/certs/bootstrap + ${Q}echo INSTALL $(patsubst $(R)$(confdir)/%,raddb/%,$@) + ${Q}$(INSTALL) -m 750 $(patsubst $(R)$(confdir)/%,raddb/%,$@) $@ # List directories before the file targets. # It's not clear why GNU Make doesn't deal well with this. diff --git a/raddb/radiusd.conf.in b/raddb/radiusd.conf.in index 620ed57e57e..6ce963ffb5f 100644 --- a/raddb/radiusd.conf.in +++ b/raddb/radiusd.conf.in @@ -61,7 +61,7 @@ sysconfdir = @sysconfdir@ localstatedir = @localstatedir@ sbindir = @sbindir@ logdir = @logdir@ -raddbdir = @raddbdir@ +confdir = @confdir@ radacctdir = @radacctdir@ # @@ -74,7 +74,6 @@ name = radiusd # # Location of config and logfiles. # -confdir = ${raddbdir} modconfdir = ${confdir}/mods-config certdir = ${confdir}/certs cadir = ${confdir}/certs @@ -163,7 +162,7 @@ pidfile = ${run_dir}/${name}.pid # # An example panic action for opening an automated session in GDB would be: # -#panic_action = "gdb -silent -x ${raddbdir}/panic.gdb %e %p 2>&1 | tee ${logdir}/gdb-${name}-%p.log" +#panic_action = "gdb -silent -x ${confdir}/panic.gdb %e %p 2>&1 | tee ${logdir}/gdb-${name}-%p.log" # # NOTE: That command can be used on a production system. # @@ -456,7 +455,7 @@ ENV { # This also permits the server to use those credentials when it is # run in debug mode. # -# KRB5_CLIENT_KTNAME = ${raddbdir}/radiusd.keytab +# KRB5_CLIENT_KTNAME = ${confdir}/radiusd.keytab # # `LD_PRELOAD` is special. It is normally set before the @@ -673,7 +672,7 @@ global { # Some of these flags can also be passed on the command line as # `-S flag=value`. # -# Dictionary migration instructions can be found in `${raddbdir}/dictionary`. +# Dictionary migration instructions can be found in `${confdir}/dictionary`. # migrate { } diff --git a/raddb/radrelay.conf.in b/raddb/radrelay.conf.in index 6425f4e23fc..6e8d8f25c36 100644 --- a/raddb/radrelay.conf.in +++ b/raddb/radrelay.conf.in @@ -74,7 +74,7 @@ sysconfdir = @sysconfdir@ localstatedir = @localstatedir@ sbindir = @sbindir@ logdir = @logdir@ -raddbdir = @raddbdir@ +confdir = @confdir@ radacctdir = @radacctdir@ # @@ -87,7 +87,6 @@ name = radrelay # # Location of config and logfiles. # -confdir = ${raddbdir} run_dir = ${localstatedir}/run/${name} libdir = @libdir@ pidfile = ${run_dir}/${name}.pid diff --git a/scripts/rc.radiusd.in b/scripts/rc.radiusd.in index da5fba4ea8e..2539aeffc21 100755 --- a/scripts/rc.radiusd.in +++ b/scripts/rc.radiusd.in @@ -38,7 +38,7 @@ sysconfdir=@sysconfdir@ export LD_LIBRARY_PATH LD_RUN_PATH LD_PRELOAD RADIUSD=$sbindir/radiusd -CONFDIR=@raddbdir@ +CONFDIR=@confdir@ DESC="FreeRADIUS" # diff --git a/scripts/solaris/svc-radius.in b/scripts/solaris/svc-radius.in index b0d5bcf606e..e576724d427 100755 --- a/scripts/solaris/svc-radius.in +++ b/scripts/solaris/svc-radius.in @@ -40,7 +40,7 @@ sysconfdir=@sysconfdir@ export LD_LIBRARY_PATH LD_RUN_PATH LD_PRELOAD RADIUSD=$sbindir/radiusd -CONFDIR=@raddbdir@ +CONFDIR=@confdir@ DESC="FreeRADIUS" # diff --git a/share/dictionary/radius/v3/README.md b/share/dictionary/radius/v3/README.md index 529d2111e95..c8dc7a57c07 100644 --- a/share/dictionary/radius/v3/README.md +++ b/share/dictionary/radius/v3/README.md @@ -2,7 +2,7 @@ The dictionaries in this directory allow the use of v3 names in v4. -See ${raddbdir}/dictionary for more information. +See $(confdir)/dictionary for more information. Do NOT copy the v3 dictionaries to this directory. The files are NOT compatible. diff --git a/src/bin/checkrad.in b/src/bin/checkrad.in index 29a73a2124d..faeb6b39c72 100644 --- a/src/bin/checkrad.in +++ b/src/bin/checkrad.in @@ -50,7 +50,7 @@ $prefix = "@prefix@"; $localstatedir = "@localstatedir@"; $logdir = "@logdir@"; $sysconfdir = "@sysconfdir@"; -$confdir = "@raddbdir@"; +$confdir = "@confdir@"; $debug = ""; #$debug = "$logdir/checkrad.log"; diff --git a/src/include/all.mk b/src/include/all.mk index 45424c29972..12688029c7c 100644 --- a/src/include/all.mk +++ b/src/include/all.mk @@ -114,7 +114,7 @@ src/include/missing.h: src/include/missing-h src/include/autoconf.sed define include_defs #define LOGDIR "${logdir}" #define LIBDIR "${libdir}" -#define CONFDIR "${raddbdir}" +#define CONFDIR "${confdir}" #define RUNDIR "${RUNDIR}" #define SBINDIR "${sbindir}" #define RADIR "${radacctdir}" diff --git a/src/modules/rlm_mruby/all.mk.in b/src/modules/rlm_mruby/all.mk.in index fd1b1781e49..c62a1f533ca 100644 --- a/src/modules/rlm_mruby/all.mk.in +++ b/src/modules/rlm_mruby/all.mk.in @@ -13,7 +13,7 @@ ifneq "$(TARGETNAME)" "" install: $(R)$(modconfdir)/mruby/example.rb $(R)$(modconfdir)/mruby: | $(R)$(modconfdir) - @echo INSTALL $(patsubst $(R)${raddbdir}%,raddb%,$@) + @echo INSTALL $(patsubst $(R)$(confdir)%,raddb%,$@) @$(INSTALL) -d -m 750 $@ $(R)$(modconfdir)/mruby/example.rb: src/modules/rlm_mruby/example.rb | $(R)$(modconfdir)/mruby diff --git a/src/modules/rlm_python/all.mk.in b/src/modules/rlm_python/all.mk.in index d4b64999e68..e7db5c19bd1 100644 --- a/src/modules/rlm_python/all.mk.in +++ b/src/modules/rlm_python/all.mk.in @@ -13,7 +13,7 @@ ifneq "$(TARGETNAME)" "" install: $(R)$(modconfdir)/python/example.py $(R)$(modconfdir)/python: | $(R)$(modconfdir) - @echo INSTALL $(patsubst $(R)${raddbdir}%,raddb%,$@) + @echo INSTALL $(patsubst $(R)$(confdir)%,raddb%,$@) @$(INSTALL) -d -m 750 $@ $(R)$(modconfdir)/python/example.py: src/modules/rlm_python/example.py | $(R)$(modconfdir)/python diff --git a/src/modules/rlm_securid/all.mk.in b/src/modules/rlm_securid/all.mk.in index a547fb85397..fd64118f626 100644 --- a/src/modules/rlm_securid/all.mk.in +++ b/src/modules/rlm_securid/all.mk.in @@ -10,10 +10,10 @@ SRC_CFLAGS := @mod_cflags@ TGT_LDLIBS := @mod_ldflags@ ifneq "$(TARGETNAME)" "" -install: $(R)${raddbdir}/mods-available/securid +install: $(R)$(confdir)/mods-available/securid -$(R)${raddbdir}/mods-available/securid: src/modules/rlm_securid/securid | $(R)${raddbdir}/mods-available +$(R)$(confdir)/mods-available/securid: src/modules/rlm_securid/securid | $(R)$(confdir)/mods-available @$(ECHO) INSTALL $(notdir $<) - @$(INSTALL) -m 640 $< $(R)${raddbdir}/mods-available + @$(INSTALL) -m 640 $< $(R)$(confdir)/mods-available endif LOG_ID_LIB = 45 diff --git a/src/tests/all.mk b/src/tests/all.mk index 9eebada1729..c75eb39d44e 100644 --- a/src/tests/all.mk +++ b/src/tests/all.mk @@ -75,7 +75,7 @@ ci-test: raddb/test.conf test ${Q}FR_LIBRARY_PATH=${BUILD_DIR}/lib/local/.libs/ ${BUILD_DIR}/make/jlibtool --mode=execute ${BUILD_DIR}/bin/local/radiusd -xxxv -n test ${Q}rm -f raddb/test.conf ${Q}$(MAKE) install - ${Q}perl -p -i -e 's/allow_vulnerable_openssl = no/allow_vulnerable_openssl = yes/' ${raddbdir}/radiusd.conf + ${Q}perl -p -i -e 's/allow_vulnerable_openssl = no/allow_vulnerable_openssl = yes/' $(confdir)/radiusd.conf ${Q}${sbindir}/radiusd -XC # diff --git a/src/tests/detail/config/radiusd.conf b/src/tests/detail/config/radiusd.conf index a2c66275965..f8b693b9040 100644 --- a/src/tests/detail/config/radiusd.conf +++ b/src/tests/detail/config/radiusd.conf @@ -12,15 +12,18 @@ output = build/tests/detail run_dir = ${output} -raddb = raddb pidfile = ${run_dir}/radiusd.pid panic_action = "gdb -batch -x src/tests/panic.gdb %e %p > ${run_dir}/gdb.log 2>&1; cat ${run_dir}/gdb.log" -maindir = ${raddb} +# +# Look at the source version of raddb for the rest of the files, not +# this directory. +# +raddb = raddb radacctdir = ${run_dir}/radacct -modconfdir = ${maindir}/mods-config -certdir = ${maindir}/certs -cadir = ${maindir}/certs +modconfdir = ${raddb}/mods-config +certdir = ${raddb}/certs +cadir = ${raddb}/certs client localhost { ipaddr = 127.0.0.1 diff --git a/src/tests/digest/config/digest.conf b/src/tests/digest/config/digest.conf index df06c004b7e..8b9683c524a 100644 --- a/src/tests/digest/config/digest.conf +++ b/src/tests/digest/config/digest.conf @@ -12,15 +12,18 @@ testdir = $ENV{TESTDIR} output = $ENV{OUTPUT} run_dir = ${output} -raddb = raddb pidfile = ${run_dir}/radiusd.pid panic_action = "gdb -batch -x src/tests/panic.gdb %e %p > ${run_dir}/gdb.log 2>&1; cat ${run_dir}/gdb.log" -maindir = ${raddb} +# +# Look at the source version of raddb for the rest of the files, not +# this directory. +# +raddb = raddb radacctdir = ${run_dir}/radacct -modconfdir = ${maindir}/mods-config -certdir = ${maindir}/certs -cadir = ${maindir}/certs +modconfdir = ${raddb}/mods-config +certdir = ${raddb}/certs +cadir = ${raddb}/certs test_port = $ENV{TEST_PORT} # Only for testing! @@ -36,7 +39,7 @@ policy { control.Password.Cleartext := "bob" } } - $INCLUDE ${maindir}/policy.d/ + $INCLUDE ${raddb}/policy.d/ } client localhost { diff --git a/src/tests/eapol_test/config/servers.conf b/src/tests/eapol_test/config/servers.conf index 7dc0c381b4c..8ef8fa0d562 100644 --- a/src/tests/eapol_test/config/servers.conf +++ b/src/tests/eapol_test/config/servers.conf @@ -12,15 +12,18 @@ testdir = $ENV{TESTDIR} output = $ENV{OUTPUT} run_dir = ${output} -raddb = raddb pidfile = ${run_dir}/radiusd.pid panic_action = "gdb -batch -x src/tests/panic.gdb %e %p > ${run_dir}/gdb.log 2>&1; cat ${run_dir}/gdb.log" -maindir = ${raddb} +# +# Look at the source version of raddb for the rest of the files, not +# this directory. +# +raddb = raddb radacctdir = ${run_dir}/radacct -modconfdir = ${maindir}/mods-config -certdir = ${maindir}/certs -cadir = ${maindir}/certs +modconfdir = ${raddb}/mods-config +certdir = ${raddb}/certs +cadir = ${raddb}/certs test_port = $ENV{TEST_PORT} # Only for testing! @@ -50,10 +53,10 @@ client eapol_test { # Modules needed for EAP # modules { - $INCLUDE ${maindir}/mods-available/always - $INCLUDE ${maindir}/mods-available/chap - $INCLUDE ${maindir}/mods-available/pap - $INCLUDE ${maindir}/mods-available/mschap + $INCLUDE ${raddb}/mods-available/always + $INCLUDE ${raddb}/mods-available/chap + $INCLUDE ${raddb}/mods-available/pap + $INCLUDE ${raddb}/mods-available/mschap # # Include the modules which are enabled for this particular @@ -113,7 +116,7 @@ policy { } } - $INCLUDE ${maindir}/policy.d/ + $INCLUDE ${raddb}/policy.d/ } # diff --git a/src/tests/ldap_sync/active_directory/config/radiusd.conf b/src/tests/ldap_sync/active_directory/config/radiusd.conf index d37a3c4c837..38efae907b3 100644 --- a/src/tests/ldap_sync/active_directory/config/radiusd.conf +++ b/src/tests/ldap_sync/active_directory/config/radiusd.conf @@ -12,15 +12,18 @@ testdir = $ENV{TESTDIR} output = $ENV{OUTPUT} run_dir = ${output} -raddb = raddb pidfile = ${run_dir}/radiusd.pid panic_action = "gdb -batch -x src/tests/panic.gdb %e %p > ${run_dir}/gdb.log 2>&1; cat ${run_dir}/gdb.log" -maindir = ${raddb} +# +# Look at the source version of raddb for the rest of the files, not +# this directory. +# +raddb = raddb radacctdir = ${run_dir}/radacct -modconfdir = ${maindir}/mods-config -certdir = ${maindir}/certs -cadir = ${maindir}/certs +modconfdir = ${raddb}/mods-config +certdir = ${raddb}/certs +cadir = ${raddb}/certs test_port = $ENV{TEST_PORT} # Only for testing! @@ -41,7 +44,7 @@ trigger { } policy { - $INCLUDE ${maindir}/policy.d/ + $INCLUDE ${raddb}/policy.d/ } client localhost { diff --git a/src/tests/ldap_sync/persistent_search/config/radiusd.conf b/src/tests/ldap_sync/persistent_search/config/radiusd.conf index 615fd0a5246..f82a8bd8fec 100644 --- a/src/tests/ldap_sync/persistent_search/config/radiusd.conf +++ b/src/tests/ldap_sync/persistent_search/config/radiusd.conf @@ -12,15 +12,18 @@ testdir = $ENV{TESTDIR} output = $ENV{OUTPUT} run_dir = ${output} -raddb = raddb pidfile = ${run_dir}/radiusd.pid panic_action = "gdb -batch -x src/tests/panic.gdb %e %p > ${run_dir}/gdb.log 2>&1; cat ${run_dir}/gdb.log" -maindir = ${raddb} +# +# Look at the source version of raddb for the rest of the files, not +# this directory. +# +raddb = raddb radacctdir = ${run_dir}/radacct -modconfdir = ${maindir}/mods-config -certdir = ${maindir}/certs -cadir = ${maindir}/certs +modconfdir = ${raddb}/mods-config +certdir = ${raddb}/certs +cadir = ${raddb}/certs test_port = $ENV{TEST_PORT} # Only for testing! @@ -57,7 +60,7 @@ policy { } } - $INCLUDE ${maindir}/policy.d/ + $INCLUDE ${raddb}/policy.d/ } client localhost { diff --git a/src/tests/ldap_sync/rfc4533/config/radiusd.conf b/src/tests/ldap_sync/rfc4533/config/radiusd.conf index 7a4268e60ab..5aceb22e2cf 100644 --- a/src/tests/ldap_sync/rfc4533/config/radiusd.conf +++ b/src/tests/ldap_sync/rfc4533/config/radiusd.conf @@ -12,15 +12,18 @@ testdir = $ENV{TESTDIR} output = $ENV{OUTPUT} run_dir = ${output} -raddb = raddb pidfile = ${run_dir}/radiusd.pid panic_action = "gdb -batch -x src/tests/panic.gdb %e %p > ${run_dir}/gdb.log 2>&1; cat ${run_dir}/gdb.log" -maindir = ${raddb} +# +# Look at the source version of raddb for the rest of the files, not +# this directory. +# +raddb = raddb radacctdir = ${run_dir}/radacct -modconfdir = ${maindir}/mods-config -certdir = ${maindir}/certs -cadir = ${maindir}/certs +modconfdir = ${raddb}/mods-config +certdir = ${raddb}/certs +cadir = ${raddb}/certs test_port = $ENV{TEST_PORT} # Only for testing! @@ -57,7 +60,7 @@ policy { } } - $INCLUDE ${maindir}/policy.d/ + $INCLUDE ${raddb}/policy.d/ } client localhost { diff --git a/src/tests/process/dhcpv4/server.conf b/src/tests/process/dhcpv4/server.conf index 39f46678c9b..d53f6e67a39 100644 --- a/src/tests/process/dhcpv4/server.conf +++ b/src/tests/process/dhcpv4/server.conf @@ -12,15 +12,18 @@ testdir = $ENV{TESTDIR} output = $ENV{OUTPUT} run_dir = ${output} -raddb = raddb pidfile = ${run_dir}/radiusd.pid panic_action = "gdb -batch -x src/tests/panic.gdb %e %p > ${run_dir}/gdb.log 2>&1; cat ${run_dir}/gdb.log" -maindir = ${raddb} +# +# Look at the source version of raddb for the rest of the files, not +# this directory. +# +raddb = raddb radacctdir = ${run_dir}/radacct -modconfdir = ${maindir}/mods-config -certdir = ${maindir}/certs -cadir = ${maindir}/certs +modconfdir = ${raddb}/mods-config +certdir = ${raddb}/certs +cadir = ${raddb}/certs test_port = $ENV{TEST_PORT} # Only for testing! diff --git a/src/tests/process/dhcpv6/server.conf b/src/tests/process/dhcpv6/server.conf index 2321b074edd..9c65d2e6be6 100644 --- a/src/tests/process/dhcpv6/server.conf +++ b/src/tests/process/dhcpv6/server.conf @@ -12,15 +12,18 @@ testdir = $ENV{TESTDIR} output = $ENV{OUTPUT} run_dir = ${output} -raddb = raddb pidfile = ${run_dir}/radiusd.pid panic_action = "gdb -batch -x src/tests/panic.gdb %e %p > ${run_dir}/gdb.log 2>&1; cat ${run_dir}/gdb.log" -maindir = ${raddb} +# +# Look at the source version of raddb for the rest of the files, not +# this directory. +# +raddb = raddb radacctdir = ${run_dir}/radacct -modconfdir = ${maindir}/mods-config -certdir = ${maindir}/certs -cadir = ${maindir}/certs +modconfdir = ${raddb}/mods-config +certdir = ${raddb}/certs +cadir = ${raddb}/certs test_port = $ENV{TEST_PORT} # Only for testing! diff --git a/src/tests/radclient/config/radiusd.conf b/src/tests/radclient/config/radiusd.conf index 2e64fc32dcb..f5fbb8e9605 100644 --- a/src/tests/radclient/config/radiusd.conf +++ b/src/tests/radclient/config/radiusd.conf @@ -12,15 +12,18 @@ testdir = $ENV{TESTDIR} output = $ENV{OUTPUT} run_dir = ${output} -raddb = raddb pidfile = ${run_dir}/radiusd.pid panic_action = "gdb -batch -x src/tests/panic.gdb %e %p > ${run_dir}/gdb.log 2>&1; cat ${run_dir}/gdb.log" -maindir = ${raddb} +# +# Look at the source version of raddb for the rest of the files, not +# this directory. +# +raddb = raddb radacctdir = ${run_dir}/radacct -modconfdir = ${maindir}/mods-config -certdir = ${maindir}/certs -cadir = ${maindir}/certs +modconfdir = ${raddb}/mods-config +certdir = ${raddb}/certs +cadir = ${raddb}/certs test_port = $ENV{TEST_PORT} # Only for testing! @@ -36,7 +39,7 @@ policy { control.Password.Cleartext := "bob" } } - $INCLUDE ${maindir}/policy.d/ + $INCLUDE ${raddb}/policy.d/ } modules { diff --git a/src/tests/tacacs/config/radiusd.conf b/src/tests/tacacs/config/radiusd.conf index 91cac536deb..6e8865b8931 100644 --- a/src/tests/tacacs/config/radiusd.conf +++ b/src/tests/tacacs/config/radiusd.conf @@ -12,15 +12,18 @@ testdir = $ENV{TESTDIR} output = $ENV{OUTPUT} run_dir = ${output} -raddb = raddb pidfile = ${run_dir}/radiusd.pid panic_action = "gdb -batch -x src/tests/panic.gdb %e %p > ${run_dir}/gdb.log 2>&1; cat ${run_dir}/gdb.log" -maindir = ${raddb} +# +# Look at the source version of raddb for the rest of the files, not +# this directory. +# +raddb = raddb radacctdir = ${run_dir}/radacct -modconfdir = ${maindir}/mods-config -certdir = ${maindir}/certs -cadir = ${maindir}/certs +modconfdir = ${raddb}/mods-config +certdir = ${raddb}/certs +cadir = ${raddb}/certs test_port = $ENV{TEST_PORT} # Only for testing! @@ -36,7 +39,7 @@ policy { control.Password.Cleartext := "bob" } } - $INCLUDE ${maindir}/policy.d/ + $INCLUDE ${raddb}/policy.d/ } client localhost { @@ -46,8 +49,8 @@ client localhost { } modules { - $INCLUDE ${maindir}/mods-available/pap - $INCLUDE ${maindir}/mods-available/chap + $INCLUDE ${raddb}/mods-available/pap + $INCLUDE ${raddb}/mods-available/chap always reject { rcode = reject diff --git a/src/tests/vmps/config/radiusd.conf b/src/tests/vmps/config/radiusd.conf index 3efcbf473c4..6a1a8b66292 100644 --- a/src/tests/vmps/config/radiusd.conf +++ b/src/tests/vmps/config/radiusd.conf @@ -12,15 +12,18 @@ testdir = $ENV{TESTDIR} output = $ENV{OUTPUT} run_dir = ${output} -raddb = raddb pidfile = ${run_dir}/radiusd.pid panic_action = "gdb -batch -x src/tests/panic.gdb %e %p > ${run_dir}/gdb.log 2>&1; cat ${run_dir}/gdb.log" -maindir = ${raddb} +# +# Look at the source version of raddb for the rest of the files, not +# this directory. +# +raddb = raddb radacctdir = ${run_dir}/radacct -modconfdir = ${maindir}/mods-config -certdir = ${maindir}/certs -cadir = ${maindir}/certs +modconfdir = ${raddb}/mods-config +certdir = ${raddb}/certs +cadir = ${raddb}/certs test_port = $ENV{TEST_PORT} # Only for testing! @@ -31,7 +34,7 @@ security { } policy { - $INCLUDE ${maindir}/policy.d/ + $INCLUDE ${raddb}/policy.d/ } client localhost {