RE: Calling a module name from a dynamic variable
5 Nov
2015
5 Nov
'15
9:47 a.m.
It's an SQL "named" module, just logs results from post-auth.
Its name is really sql-radius-lan0 or sql-radius-lan1 or whatever, depending on certain circumstances.
-----Original Message-----
From: Freeradius-Users [mailto:freeradius-users-bounces+andy.franks=sath.nhs.uk@lists.freeradius.org] On Behalf Of Jorge Pereira
Sent: 05 November 2015 14:26
To: FreeRadius users mailing list
Subject: Re: Calling a module name from a dynamic variable
Frank,
What is your "mymodule"? a xlat function? tell more about the "mymodule"
--
Jorge Pereira
On Thu, Nov 5, 2015 at 12:15 PM, Franks Andy (IT Technical Architecture
Manager) <Andy.Franks@sath.nhs.uk> wrote:
> Hi Jorge,
> Still the same :
> Failed to find "%{%{control:Tmp-String-0}}" as a module or policy.
>
> Oh well.
> Thanks
> Andy
>
> -----Original Message-----
> From: Freeradius-Users [mailto:freeradius-users-bounces+andy.franks=
> sath.nhs.uk@lists.freeradius.org] On Behalf Of Jorge Pereira
> Sent: 05 November 2015 13:26
> To: FreeRadius users mailing list
> Subject: Re: Calling a module name from a dynamic variable
>
> Hi Frank,
>
> try this...
>
> update control {
> Tmp-String-0 := "mymodule"
> }
>
> "%{%{control:Tmp-String-0}}" {
> Fail =1
> }
>
> --
> Jorge Pereira
>
> On Thu, Nov 5, 2015 at 11:19 AM, Franks Andy (IT Technical
> Architecture
> Manager) <Andy.Franks@sath.nhs.uk> wrote:
>
> > Hi all,
> > Freeradius 3.1 from git.
> >
> > Just wanted to know if I can do this :
> >
> > Update control {
> > Tmp-String-0 := "mymodule"
> > }
> >
> > "%{control:Tmp-String-0}" {
> > Fail =1
> > }
> >
> > Hopefully it's obvious - I want to prepare a variable and call a
> > matching module name from the variable, in this case mymodule.
> > It doesn't work at the moment as the string isn't evaluated - it
> > just
> says:
> >
> > Failed to find "%{control:Tmp-String-0}" as a module or policy.
> >
> > If I can't, I can't no worries, I would just stop me searching if I knew.
> >
> > Thanks
> > Andy
> > -
> > 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
>
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
5 Nov
5 Nov
9:52 a.m.
New subject: Calling a module name from a dynamic variable
On Nov 5, 2015, at 9:47 AM, Franks Andy (IT Technical Architecture Manager) <Andy.Franks@sath.nhs.uk> wrote:
It's an SQL "named" module, just logs results from post-auth. Its name is really sql-radius-lan0 or sql-radius-lan1 or whatever, depending on certain circumstances.
You can't do that and with the way the code is structured it'd be very hard to support that. Use switch and enumerate the possible modules you want to call. -Arran
3898
Age (days ago)
3898
Last active (days ago)
1 comments
2 participants
participants (2)
-
Arran Cudbard-Bell -
Franks Andy (IT Technical Architecture Manager)