Conditions for executing module
Hello, FR 2.1.9 and novice in FR module programming. :) How to define some conditions in users/acct_users file when to use our module? It is quite heavy and we'd like to avoid its execution in as many cases as possible. I tried such configuration in users. Idea comes from http://freeradius.org/radiusd/doc/Autz-Type DEFAULT Auth-Type := Ourclient, Calling-Station-Id == "333" DEFAULT Auth-Type := Accept And adding this to sites-enabled/default: Auth-Type Ourclient { ourclient } But rlm_files complains about unknown value for Auth-Type. Should I just define this new Auth-Type in dictionary (then which range of values is for local use?) or there is more elegant solution? Regards, Mindaugas
Mindaugas Riauba wrote:
How to define some conditions in users/acct_users file when to use our module? It is quite heavy and we'd like to avoid its execution in as many cases as possible.
See "man unlang"
I tried such configuration in users. Idea comes from http://freeradius.org/radiusd/doc/Autz-Type DEFAULT Auth-Type := Ourclient, Calling-Station-Id == "333" DEFAULT Auth-Type := Accept And adding this to sites-enabled/default: Auth-Type Ourclient {
... *where* did you add it?
ourclient }
But rlm_files complains about unknown value for Auth-Type. Should I just define this new Auth-Type in dictionary (then which range of values is for local use?) or there is more elegant solution?
Put it in the "authenticate" section, and it should work. Alan DeKok.
How to define some conditions in users/acct_users file when to use our module? It is quite heavy and we'd like to avoid its execution in as many cases as possible.
See "man unlang" Put it in the "authenticate" section, and it should work.
Thanks. But in the end I added custom Auth-Type and Acct-Type and choose them in the users/acct_users files. It was the simpliest way because we already were using those files for the choices. By the way in dictionary it is documented that values 3000-4000 are reserved for site local attributes. But what about similar range for site local values? For now I started from 3000. Regards, Mindaugas
participants (2)
-
Alan DeKok -
Mindaugas Riauba