I have a perlmodule.pm with authorize, post_auth blocks. I’ve a variable in authorize block which do some ldap checks and save end result. I want to read this variable in sites-available/default file to compare the values.
I’m trying to refer the variable in below way
sites-available/default
if ("%{CustomAttribute}" == 0) {
#####Do Something
}
I’ve additionally added CustomAttribute to my freeradius dictionary as well.
ATTRIBUTE CustomAttribute 17270 integer
While performing radtest
I get below error when radius reaching the if block I added in sites-available/default file.
Output from radiusd -X
(0) Tue May 14 18:22:27 2024: Debug: elsif ("%{CustomAttribute}" == 0) {
(0) Tue May 14 18:22:27 2024: ERROR: Failed retrieving values required to evaluate condition
Can someone show me the right way to retrieve this variable from the perlmodule to compare it in sites-available/default file under authorize block?