Hi Everyone,
I am sending this message at very first time, and I hope that I’ll
get response.
My Question is that:
In sql.conf’s Authorization section, can I write my own queries and
can I use the result of my own query. For detailed elaboration I will
give you following example:
I want something like that:
authorize_check_query = "SELECT id, UserName, Attribute, Value, op,
uid \
FROM ${authcheck_table} \
WHERE Username = '%{SQL-User-Name}' \
ORDER BY id"
in query above I created another field `uid` in my radcheck table and
suppose here I am getting some kind of user-id.
Then I want to
use this value in next authorize_reply_query
something like that:
authorize_reply_query = "SELECT id, UserName, Attribute, Value, op \
FROM ${authreply_table} \
WHERE Username = '%{SQL-User-Name}' AND uid=
'%{authorize_check_query[5]}' \
ORDER BY id"
Instead of
authorize_check_query I can also use my own query if possible
example
my_own_query = “SELECT uid from mytable where Username='%{SQL-User-Name}'
and then I should be able to use the result of my_own_query. Like my_own_query[0];
etc etc
I am using:
freeradius-1.0.5
with MySql 5.0
Hope I will get help soon.
Thanks in advance for your time.
|