On 15.07.20 14:13, Matthew Newton wrote:
On 15/07/2020 12:51, Sven Hartge wrote:> I just noticed something strange with 3.0.21 from buster-backport...> Notice how the load-order is different? It seems freeradius does not > load the files in alphanumeric order but in the order the filesystem > presents them, breaking the parsing of policy.d/thm_rada in this case > because policy.d/canonicalization hasn't been parsed yet.> > Is this known or am I doing something wrong? I don't believe FreeRADIUS has ever made any guarantees about file load order in a directory.
The comment states "If policy A calls policy B, then B MUST be defined before A." which I am doing here, because "t" comes after "c" but it clearly isn't doing that.
You can include a file in the main radiusd.conf which contains your definitions, before the policy directory is included. That way it's explicit in the config and won't break.
Of course, as a quick workaround I could also just append the contents of thm_rada to canonicalization to make it work. But I'd rather keep the configuration as pristine as possible to make upgrades down the line easier. And in the end the load order should be fixed by sorting before loading to make it stable for everyone and not break semi-randomly based on the way a filesystem presents/stores the entries in a directory. Grüße, Sven.