From LB0074453@TechMahindra.com Tue Feb 5 11:45:03 2013 From: Lakshmi Narayana Baliah To: freeradius-users@lists.freeradius.org Subject: stored procedure value for access-reject in free radius Date: Tue, 05 Feb 2013 16:14:52 +0530 Message-ID: <1B91A6A3C38A4F4B9E3B1AE4D3746E1805859F39@SINBNGEX001.TechMahindra.com> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============9096843642003670139==" --===============9096843642003670139== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi all, I want to configure the free radius to return access-reject based on the v= alue in stored procedure in oracle database( i have configured oracle databas= e to free radius) How do i do that ??? please help.... Lakshmi narayana |=C2=A0Prod Engineering | Tech Mahindra #9/7 Hosur Road,Bangalore-560029 /Office: +91 80=C2=A040243000, Extn: 3486 | Mobile: +91 9060867386 Email:lb0074453@techmahindra.com www.techmahindra.com =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Disclaimer: This message and the information contained herein is proprietary= and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaim= er.html=20 externally and ht= tp://tim.techmahindra.com/tim/disclaimer.html internally within Tech Mahi= ndra. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --===============9096843642003670139==-- From list@fajar.net Tue Feb 5 12:42:23 2013 From: "Fajar A. Nugraha" To: freeradius-users@lists.freeradius.org Subject: Re: stored procedure value for access-reject in free radius Date: Tue, 05 Feb 2013 22:42:21 +1100 Message-ID: In-Reply-To: <1B91A6A3C38A4F4B9E3B1AE4D3746E1805859F39@SINBNGEX001.TechMahindra.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1109085695531012900==" --===============1109085695531012900== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Tue, Feb 5, 2013 at 9:44 PM, Lakshmi Narayana Baliah wrote: > > Hi all, > > I want to configure the free radius to return access-reject based on the= value in stored procedure in oracle database( i have configured oracle datab= ase to free radius) > > > How do i do that ??? please help.... One way to do that is with unlang: http://freeradius.org/radiusd/man/unlang.h= tml Hint: "if" block, "%{sql:...}", and "reject". Another way is to have radcheck db entry for that user, but with "Auth-Type :=3D Reject" -- Fajar --===============1109085695531012900==-- From p.mayers@imperial.ac.uk Tue Feb 5 12:46:47 2013 From: Phil Mayers To: freeradius-users@lists.freeradius.org Subject: Re: stored procedure value for access-reject in free radius Date: Tue, 05 Feb 2013 11:46:18 +0000 Message-ID: <5110F10A.2030609@imperial.ac.uk> In-Reply-To: <1B91A6A3C38A4F4B9E3B1AE4D3746E1805859F39@SINBNGEX001.TechMahindra.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7041046340970320480==" --===============7041046340970320480== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On 05/02/13 10:44, Lakshmi Narayana Baliah wrote: > > Hi all, > > I want to configure the free radius to return access-reject based on th= e value in stored procedure in oracle database( i have configured oracle data= base to free radius) > > > How do i do that ??? please help.... There are many ways, it depends on exactly what you want to do. You are=20 being too vague. One option is to use an SQL xlat in unlang, like so: authorize { ... update control { Tmp-String-0 :=3D "%{sql: }" } if (control:Tmp-String-0 =3D=3D "reject") { reject } ... } The SQL inside the XLAT can reference packet values e.g. %{sql:select some_proc('%{User-Name}')} --===============7041046340970320480==--