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/files/authorize | |
parent | Initial commit. (diff) | |
download | freeradius-af754e596a8dbb05ed8580c342e7fe02e08b28e0.tar.xz freeradius-af754e596a8dbb05ed8580c342e7fe02e08b28e0.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/files/authorize')
-rw-r--r-- | src/tests/modules/files/authorize | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/src/tests/modules/files/authorize b/src/tests/modules/files/authorize new file mode 100644 index 0000000..b85f6a2 --- /dev/null +++ b/src/tests/modules/files/authorize @@ -0,0 +1,92 @@ +# +# Test if the "users" file works +# + + +# +# Basic syntax tests with comments. Parsing only. +# + +user Cleartext-Password := "hello" # comment! + + +user2 # comment! + Reply-Message := "24" + + +# +# Setting ":=" of reply and control items +# + +bob Cleartext-Password := "hello" + Reply-Message := "success" + + +# +# Detect erroneous Fall-Through +# + +doug Cleartext-Password := "goodbye" + Reply-Message := "success" + +doug + Reply-Message := "unreachable" + + +# +# Fall-Through across a non-matching entry +# + +famous Cleartext-Password := "bradpitt" + Fall-Through = yes + +unused Cleartext-Password := "jabberwocky" + Reply-Message := "fail" + +famous + Reply-Message := "success" + + +# +# Modification of the reply list +# + +addreply Cleartext-Password := "testing123" + Reply-Message := "success1", + Fall-Through = yes + +addreply + Reply-Message += "success2" + + +subreply Cleartext-Password := "testing123" + Reply-Message := "success1", + Reply-Message += "success2", + Reply-Message += "success3", + Fall-Through = yes + +subreply Cleartext-Password := "testing123" + Reply-Message -= "success2" + + +filterreply Cleartext-Password := "testing123" + Reply-Message := "success1", + Reply-Message += "success2", + Fall-Through = yes + +filterreply Cleartext-Password := "testing123" + Reply-Message !* ANY + + +# +# Addition "+=" to the control list +# +# Note: Set ":=" of control items is already tested with Cleartext-Password +# Note: Filtering "!*" does not apply to control items as this would overload +# the operator syntax since "!*" checks that no such attribute in the +# request. + +addcontrol Cleartext-Password := "testing123", Reply-Message := "success1" + Fall-Through = yes + +addcontrol Reply-Message += "success2" |