Correct way of redefining sql queries
Alan DeKok
aland at deployingradius.com
Wed Mar 9 12:21:25 UTC 2022
On Mar 8, 2022, at 5:36 PM, Jiří Hromádka <hrom.jiri at gmail.com> wrote:
> I’d like to ask what is the correct way to redefine some main sql queries in mods-config and don’t change default files so any updates won’t stop asking what version I want?
>
> Let’s say I need to add few more conditions to “authorize_check_query” in sql/main/mysql/queries.conf. Editing this file directly will make future updates stops, asking me which version to use (in case this file is changed in new version)
Exactly.
> I’ve created new file with redefined query and included that file at the end of the rlm_sql instance definition, right before include of default queries.conf with other queries definition. Based on debug output, I can see that authorize_check_query contains my changed SQL query.
That's fine.
> The question is, is this correct way to do this or is there better one?
That's the correct way.
Alan DeKok.
More information about the Freeradius-Users
mailing list