diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 14:11:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 14:11:00 +0000 |
commit | af754e596a8dbb05ed8580c342e7fe02e08b28e0 (patch) | |
tree | b2f334c2b55ede42081aa6710a72da784547d8ea /src/tests/modules/radiusd.conf | |
parent | Initial commit. (diff) | |
download | freeradius-b95e0cd7685e6bbc2465b1f4efe1884df2f4ef01.tar.xz freeradius-b95e0cd7685e6bbc2465b1f4efe1884df2f4ef01.zip |
Adding upstream version 3.2.3+dfsg.upstream/3.2.3+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tests/modules/radiusd.conf')
-rw-r--r-- | src/tests/modules/radiusd.conf | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/src/tests/modules/radiusd.conf b/src/tests/modules/radiusd.conf new file mode 100644 index 0000000..f2dce8a --- /dev/null +++ b/src/tests/modules/radiusd.conf @@ -0,0 +1,103 @@ +# +# Minimal radiusd.conf for testing modules +# + +raddb = raddb + +modconfdir = ${raddb}/mods-config + +correct_escapes = true + +# Only for testing! +# Setting this on a production system is a BAD IDEA. +security { + allow_vulnerable_openssl = yes +} + +modules { + $INCLUDE ${raddb}/mods-enabled/always + + $INCLUDE ${raddb}/mods-enabled/pap + + $INCLUDE ${raddb}/mods-enabled/expr + + $INCLUDE $ENV{MODULE_TEST_DIR}/module.conf +} + +server default { + authorize { + # + # Include the test file specified by the + # KEYWORD environment variable. + # + $INCLUDE $ENV{MODULE_TEST_UNLANG} + + pap + } + + authenticate { + pap + } +} + +policy { + test_pass { + update control { + &Tmp-String-8 := "%{expr:%{%{control:Tmp-String-8}:-0} + 1}" + &Auth-Type := Accept + } + } + + test_fail { + update reply { + &Reply-Message := "fail %{%{control:Tmp-String-8}:-0}" + } + reject + } + + # + # Outputs the contents of the control list in debugging (-X) mode + # + debug_control { + if("%{debug_attr:control:}" == '') { + noop + } + } + + # + # Outputs the contents of the request list in debugging (-X) mode + # + debug_request { + if("%{debug_attr:request:}" == '') { + noop + } + } + + # + # Outputs the contents of the reply list in debugging (-X) mode + # + debug_reply { + if("%{debug_attr:reply:}" == '') { + noop + } + } + + # + # Outputs the contents of the session state list in debugging (-X) mode + # + debug_session_state { + if("%{debug_attr:session-state:}" == '') { + noop + } + } + + # + # Outputs the contents of the main lists in debugging (-X) mode + # + debug_all { + debug_control + debug_request + debug_reply + debug_session_state + } +} |