not logged in | [Login]
Always use radiusd -X
when debugging!
paircompare()
functionality returns a dynamic comparison for attributes. It's like taking a dynamic value every time the attribute is referenced, except that the comparison is done in the paircompare()
function.
The underlying paircompare()
function compares attributes to attributes in the request. It doesn't handle lists. It's called from:
cond_eval.c
- compare one attribute in an if
statement. The list is handled by the cond_eval
functionality.rlm_files.c
- users file comparisonsrlm_preprocess.c
, hints and huntgroups comparisonsrlm_sql.c
- compare radcheck
and radgroupcheck
items retrieved from SQLIt's also referenced from:
unlang_compile.c
comment as mark up paircompare fixups (?)Pair comparisons are registered by:
src/main/pair.c
- paircompare_register_byname()
rlm_expiration
- the Expiration
attribute. *can be replaced by more unlang`rlm_expr
- Prefix
, Suffix
, Connect-Rate
, Packet-Type
, and Response-Packet-Type
, src/dst ip/port, virtual server, packet processing stage, Most of these can either be deleted, or replaced with dynamic xlats.
rlm_ldap
- LDAP-Group
rlm_logintime
- Current-Time
, and Time-of-Day
, can either be deleted, or replaced with dynamic xlats.
rlm_sql
- SQL-Group
rlm_sqlcounter
- counter thing?rlm_test
rlm_unix
- Unix-Group
should probably be replaced with a map?
rlm_winbind
Winbind-Group
Many of these can be replaced by dynamic xlats (e.g. Current-Time
)
The various group functionalities could be replaced (badly) with xlat expansions: %{ldap-group:%{User-Name} sales}
which is shit, but would work.
It would be ideal to allow LDAP-Group == sales
to still work. But that means fixing all of the callers of paircompare()
to allow for it to be async, too. That's a lot of work. The better approach is just to replace comparison of virtual attributes with xlat expansions, or function calls.
It's likely easier to fix the callers so that they call map
functions, and then just get rid of the paircompare()
functionality altogether.
Note: paircompare()
is part condition, and part map. i.e. the paircompare()
functions set some attributes unconditionally, and return true/false for comparison of other attributes. It also takes a list of VALUE_PAIR
s, and thus is not really amenable to converting it to maps and conditions.
Prefix
. People don't really use themraddb/README
hints
and huntgroups
. Sorry.radcheck
and radgroupcheck
functions to return conditions and maps?PAIR_LIST
to return conditions and maps?, and pairlist_read()
, which is only called from rlm_files
and rlm_preprocess
paircompare()
, with a duplicate API.Last edited by Arran Cudbard-Bell, 2018-06-13 22:51:48
Sponsored by Network RADIUS