<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns:o = "urn:schemas-microsoft-com:office:office"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1555" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>interesting work around... I think I will try
this.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks</FONT></DIV>
<DIV> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=jurgen@wanbound.com href="mailto:jurgen@wanbound.com">Jurgen van
Vliet</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=freeradius-users@lists.freeradius.org
href="mailto:freeradius-users@lists.freeradius.org">'FreeRadius users mailing
list'</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, July 13, 2006 9:45
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> RE: multiple post-auth sql
queries, possible?</DIV>
<DIV><BR></DIV>
<DIV dir=ltr align=left><FONT face=Verdana color=#0000ff size=2><SPAN
class=203454114-13072006>Hi Duane</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Verdana color=#0000ff size=2><SPAN
class=203454114-13072006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Verdana color=#0000ff size=2><SPAN
class=203454114-13072006>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. </SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Verdana color=#0000ff size=2><SPAN
class=203454114-13072006>You can even use IF THEN ELSE structures,
and call that procedure from post-auth as a single
query.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Verdana color=#0000ff size=2><SPAN
class=203454114-13072006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Verdana color=#0000ff size=2><SPAN
class=203454114-13072006>like : postauth_query = "call
postauth1('%{SQL-User-Name}');"</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Verdana color=#0000ff size=2><SPAN
class=203454114-13072006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Verdana color=#0000ff size=2><SPAN
class=203454114-13072006>this calls the stored procedure postauth1 and gives
the sql user name as parameter for the procedure to work
with.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Verdana color=#0000ff size=2><SPAN
class=203454114-13072006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Verdana color=#0000ff size=2><SPAN
class=203454114-13072006>Maybe that solves your problem :)</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Verdana color=#0000ff size=2><SPAN
class=203454114-13072006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Verdana color=#0000ff size=2><SPAN
class=203454114-13072006>Good luck!</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Verdana color=#0000ff size=2><SPAN
class=203454114-13072006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Verdana color=#0000ff size=2><SPAN
class=203454114-13072006>
<DIV><SPAN class=046094711-03062005>Jurgen van Vliet</SPAN></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><IMG alt="" hspace=0 src="cid:001e01c6a69c$66bc4000$54360f0a@nebula"
align=baseline border=0></DIV>
<DIV> </DIV>
<DIV>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><A name=OLE_LINK4></A><A
name=OLE_LINK3><SPAN style="mso-bookmark: OLE_LINK4"><SPAN
style="FONT-SIZE: 8pt; COLOR: black; mso-fareast-language: KO">WANBound
Technologies | Veldzigt 28 | 3454 PW De Meern | The
Netherlands</SPAN></SPAN></A><SPAN style="mso-bookmark: OLE_LINK3"> <SPAN
style="mso-bookmark: OLE_LINK4"><SPAN
style="FONT-SIZE: 3pt; COLOR: black; mso-fareast-language: KO"><o:p></o:p></SPAN></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="mso-bookmark: OLE_LINK3"><SPAN style="mso-bookmark: OLE_LINK4"><SPAN
style="FONT-SIZE: 3pt; COLOR: black; mso-fareast-language: KO"><o:p> </o:p></SPAN></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="mso-bookmark: OLE_LINK3"><SPAN style="mso-bookmark: OLE_LINK4"><SPAN
style="FONT-SIZE: 8pt; COLOR: black; mso-fareast-language: KO">Tel: +31 30 66
61 940 | Fax: +31 30 66</SPAN></SPAN></SPAN><SPAN
style="mso-bookmark: OLE_LINK3"> <SPAN style="mso-bookmark: OLE_LINK4"><SPAN
style="FONT-SIZE: 8pt; mso-fareast-language: KO">64 339 <SPAN
style="COLOR: black">| Email: </SPAN><SPAN
style="COLOR: #512f6b">jvanvliet@wanbound.com | Website:
</SPAN></SPAN></SPAN></SPAN><A href="http://www.wanbound.com/"><SPAN
style="mso-bookmark: OLE_LINK3"><SPAN style="mso-bookmark: OLE_LINK4"><SPAN
style="FONT-SIZE: 8pt; COLOR: #512f6b; mso-fareast-language: KO">www.wanbound.com</SPAN></SPAN></SPAN>
<SPAN style="mso-bookmark: OLE_LINK3"><SPAN
style="mso-bookmark: OLE_LINK4"></SPAN></SPAN></A><SPAN
style="mso-bookmark: OLE_LINK3"><SPAN style="mso-bookmark: OLE_LINK4"><SPAN
style="FONT-SIZE: 8pt; COLOR: black; mso-fareast-language: KO"><o:p></o:p></SPAN></SPAN></SPAN></P></DIV></SPAN></FONT><BR></DIV>
<DIV class=OutlookMessageHeader lang=nl dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>Van:</B>
freeradius-users-bounces+jurgen=wanbound.com@lists.freeradius.org
[mailto:freeradius-users-bounces+jurgen=wanbound.com@lists.freeradius.org]
<B>Namens </B>Duane Cox<BR><B>Verzonden:</B> donderdag 13 juli 2006
16:32<BR><B>Aan:</B> FreeRadius users mailing list<BR><B>Onderwerp:</B> Re:
multiple post-auth sql queries, possible?<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2>Is it possible to run a module twice in one
section... </FONT></DIV>
<DIV><FONT face=Arial size=2>meaning can I run the sql module twice in the
post-auth section ?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks</FONT></DIV>
<DIV><FONT face=Arial size=2>Duane Cox</FONT></DIV>
<DIV> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=duanec@illicom.net href="mailto:duanec@illicom.net">Duane Cox</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=freeradius-users@lists.freeradius.org
href="mailto:freeradius-users@lists.freeradius.org">freeradius-users@lists.freeradius.org</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, July 12, 2006 4:24
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> multiple post-auth sql
queries, possible?</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2>Hello List</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Is there a way to have freeradius 1.1.1 send
two or more sql postauth queries?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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"</FONT></DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>here is my current config ...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>post-auth {<BR> </FONT><FONT face=Arial
size=2> sql</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>
Post-Auth-Type REJECT
{<BR>
sql<BR> }<BR>}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>and then mssql.conf contains one
postauth_query</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks</FONT></DIV>
<DIV><FONT face=Arial size=2>Duane Cox</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<P>
<HR>
<P></P>- <BR>List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html</BLOCKQUOTE>
<P>
<HR>
<P></P>- <BR>List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html</BLOCKQUOTE></BODY></HTML>