Correct way of redefining sql queries

Jiří Hromádka hrom.jiri at gmail.com
Tue Mar 8 22:36:44 UTC 2022


Hello,

 

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)

 

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.

 

The question is, is this correct way to do this or is there better one?

 

Thank you very much for your help in advance.

 

Regards

Jiri

 



More information about the Freeradius-Users mailing list