new table and query
Johansson, Daniel (GIS)
Daniel.Johansson2 at sony.com
Thu Aug 31 14:13:38 CEST 2017
Thanks, i will add the if() statement it's not good as it is now. I just wanted to get something working and will make it nice now when it is working.
/Daniel
-----Original Message-----
From: Freeradius-Users [mailto:freeradius-users-bounces+daniel.johansson2=sony.com at lists.freeradius.org] On Behalf Of Alan Buxey
Sent: den 31 augusti 2017 14:11
To: FreeRadius users mailing list <freeradius-users at lists.freeradius.org>
Subject: RE: new table and query
Not to confuse things but there is a way of doing that. Well out of scope and for those who are adventurous ;)
However, I would advise that you wrap your SQL: unlang with an if() wrapper checking for presence of a calling-station-id - that would avoid any stage corner cases and not lead to weirdness
alan
On 31 Aug 2017 1:07 pm, "Johansson, Daniel (GIS)" < Daniel.Johansson2 at sony.com> wrote:
> Hi and thanks for your answers.
>
> I do this now and it works fine.
>
> post-auth {
> sql
> %{sql:INSERT INTO authorizedmacs (macaddress) VALUES
> ('%{Calling-Station-Id}')} }
>
> I will read the CREATE PROCEDURE and CREATE FUNCTION for mysql I
> haven’t worked with those before but they look handy.
>
> Maybe there could be a sql.runMyFunction ?
> I like to invent things :)
>
> Thanks again
> /Daniel
>
>
> -----Original Message-----
> From: Freeradius-Users
> [mailto:freeradius-users-bounces+daniel.johansson2=
> sony.com at lists.freeradius.org] On Behalf Of Alan DeKok
> Sent: den 31 augusti 2017 13:40
> To: FreeRadius users mailing list
> <freeradius-users at lists.freeradius.org>
> Subject: Re: new table and query
>
> On Aug 31, 2017, at 2:46 AM, Johansson, Daniel (GIS) <
> Daniel.Johansson2 at sony.com> wrote:
> > I use FreeRADIUS Version 2.2.6
> > I want to make a custom table and query for freeradius.
> > sql is enabled in sites-enabled/default for 'post-auth {sql}'
> > and postauth_query is populating radpostauth However my
> 'macuseradd_query ' is not run can anyone tell me why?
>
> Why not just add a stored procedure to do multiple things? And then
> call the stored procedure from the postauth_query.
>
> And yes, you can't just invent things in the configuration file and
> expect them to do something. The documentation explains what those
> queries are, and when they're run.
>
> Alan DeKok.
>
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/
> list/users.html
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/
> list/users.html
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
More information about the Freeradius-Users
mailing list