multiple post-auth sql queries, possible?
Duane Cox
duanec at illicom.net
Thu Jul 13 18:50:09 CEST 2006
interesting work around... I think I will try this.
Thanks
----- Original Message -----
From: Jurgen van Vliet
To: 'FreeRadius users mailing list'
Sent: Thursday, July 13, 2006 9:45 AM
Subject: RE: multiple post-auth sql queries, possible?
Hi Duane
If you use a DB backend that supports stored procedures (like mysql 5) you can make a procedure in your mysql server containing several queries.
You can even use IF THEN ELSE structures, and call that procedure from post-auth as a single query.
like : postauth_query = "call postauth1('%{SQL-User-Name}');"
this calls the stored procedure postauth1 and gives the sql user name as parameter for the procedure to work with.
Maybe that solves your problem :)
Good luck!
Jurgen van Vliet
WANBound Technologies | Veldzigt 28 | 3454 PW De Meern | The Netherlands
Tel: +31 30 66 61 940 | Fax: +31 30 66 64 339 | Email: jvanvliet at wanbound.com | Website: www.wanbound.com
------------------------------------------------------------------------------
Van: freeradius-users-bounces+jurgen=wanbound.com at lists.freeradius.org [mailto:freeradius-users-bounces+jurgen=wanbound.com at lists.freeradius.org] Namens Duane Cox
Verzonden: donderdag 13 juli 2006 16:32
Aan: FreeRadius users mailing list
Onderwerp: Re: multiple post-auth sql queries, possible?
Is it possible to run a module twice in one section...
meaning can I run the sql module twice in the post-auth section ?
I am thinking I could, but I would have to call it by a new name and then copy the lib files to also this new name.
Thanks
Duane Cox
----- Original Message -----
From: Duane Cox
To: freeradius-users at lists.freeradius.org
Sent: Wednesday, July 12, 2006 4:24 PM
Subject: multiple post-auth sql queries, possible?
Hello List
Is there a way to have freeradius 1.1.1 send two or more sql postauth queries?
I tried to put together an update statement and an insert statement with a "go" command, but mssql didn't like it because the insert, go, update was all on the same "line"
executing the above statement; but broken out on three lines with "go" by itself, works, but I'm not sure if I can do this in freeradius.
So is it possible to have freeradius process sql1 and then sql2 in the post-auth section, if so what would be the best way to set this up.
here is my current config ...
post-auth {
sql
Post-Auth-Type REJECT {
sql
}
}
and then mssql.conf contains one postauth_query
Thanks
Duane Cox
----------------------------------------------------------------------------
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
------------------------------------------------------------------------------
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20060713/c234d601/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: atteb865.jpg
Type: image/jpeg
Size: 5407 bytes
Desc: not available
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20060713/c234d601/attachment.jpg>
More information about the Freeradius-Users
mailing list