Implementing SQL Insert/logging for SoH.
Alan DeKok
aland at deployingradius.com
Tue Aug 2 15:07:37 CEST 2011
Palmer J.D.F. wrote:
> Further to my last foray onto the list regarding SoH, I'm looking to
> commit the returned SoH info to the radius database using FreeRADIUS'
> sql connection.
It's just attributes.
> I could be well off target here, but please humour me, so far I have...
>
> Created a table 'radsoh', and declared this inside sql.conf.
OK...
> Added a query (soh_query) to dialup.conf, at present this simply just
> inserts User-Name to the table.
Uh... that won't work.
> Declared soh_query in rlm_sql/conf.h
> Declared soh_query in the 'module_config' section of rlm_sql.c
> Declared a function, rlm_sql_soh, which is essentially a copy of
> rlm_sql_postauth into rlm_sql.c.
> Added rlm_sql_soh to the export section of rlm_sql.c.
And all of that is unnecessary.
> It compiles and runs, but here is where I run out of ideas.
>
> Presuming I'm on the right track, what else is required to enable the
> query, and how would I make the call to execute the query?
> Ideally the call should be made from the with SoH virtual server defined
> in raddb/sites-enabled.
Read raddb/sites-available/soh. The server runs an "authorize"
section. This is *exactly* like the normal "authorize" section for a
RADIUS packet. Just configure the authorize queries, and go.
No source code mods are needed.
Alan DeKok.
More information about the Freeradius-Users
mailing list