On 21-Jan-09, at 10:03 AM, Alan DeKok wrote:
Gabriel Blanchard wrote:
So I am in the process of upgrading from freeradius 1.x to 2.x. I have scripts that check if my radius configuration is correct before I actually run radiusd. I'm more specifically interested in checking if my fastusers file syntax is correct before loading it.
In 2.x, there is no benefit to using "fastusers". The "users" file code has been updated to use hash tables internally. It does everything the "fastusers" file does.
Oh, I had no idea thanks.
After some more digging I found that the module needs to have a type flag of "RLM_TYPE_CHECK_CONFIG_SAFE" for it to check. Now I'm not sure if I should just blindly change the source code and add this flag in the module or not. Should I just try it and report back if it works?
That may work.
Realistically, the "fastusers" module should be deleted. Please try using the "files" module instead.
Well I already tried it and its working. Here is the stupidly short patch --- src/modules/rlm_fastusers/rlm_fastusers.c 2009-01-21 09:52:39.000000000 -0500 +++ src/modules/rlm_fastusers/rlm_fastusers.c 2009-01-21 09:53:05.000000000 -0500 @@ -783,7 +783,7 @@ module_t rlm_fastusers = { RLM_MODULE_INIT, "fastusers", - 0, /* type: reserved */ + RLM_TYPE_CHECK_CONFIG_SAFE, /* type: RLM_TYPE_CHECK_CONFIG_SAFE */ fastuser_instantiate, /* instantiation */ fastuser_detach, /* detach */ { Does the users module also reload the users file every x seconds like the fastusers module? This is specifically what I want. -Gabriel