EXEC : possible to update pairs directly?

FRANKS, Andy (SHREWSBURY AND TELFORD HOSPITAL NHS TRUST) andy.franks1 at nhs.net
Tue Aug 11 14:01:17 CEST 2020


Thanks Alan.

>>   Sorry.  :(  We're working on it, but there's a ton of things to fix in v4.

I just appreciate you've done this thing you can download for free, put your time into it, believe in open source. I've little room to grumble. :-)

>> Arran's wrong!
Lol!
For now, I'll just update when "back in" freeradius, copy attributes over, it's not too bad.

Alternatively I guess I could work a bit more on getting 3.1 working again, that's been working here for years now perfectly, but it no longer compiles.

>> Perl in v4 still works.
I'll have to look into Perl with mysql, if it works as is reliable and quick, then it should be a possibility. I'd always thought perl was a bit "yesterday" according to general thinking, but I'm not overly bothered by that.
I've dabbled with Python, but lack the knowledge around creating full modules, rather than "scripts", I should just learn I guess!

Thanks again
Andy

-----Original Message-----
From: Freeradius-Users <freeradius-users-bounces+andy.franks1=nhs.net at lists.freeradius.org> On Behalf Of Alan DeKok
Sent: 11 August 2020 12:50
To: FreeRadius users mailing list <freeradius-users at lists.freeradius.org>
Subject: Re: EXEC : possible to update pairs directly?

On Aug 11, 2020, at 6:45 AM, FRANKS, Andy (SHREWSBURY AND TELFORD HOSPITAL NHS TRUST) via Freeradius-Users <freeradius-users at lists.freeradius.org> wrote:
>  Just researching possibilities to help me around the upgrades I need to do to move from old operating systems and FR3.1.
> I tried v4 for a while, and may go back to that, but am struggling with the exec module race condition - the dilemma is that I can't spend too long redoing what we used to do in exec.

  Sorry.  :(  We're working on it, but there's a ton of things to fix in v4.

> I've gone back to v3.0.22 to see what I can do there, but missed the SQL maps bit quite a bit so have do a few quick tests to see what I can achieve in the exec module, expanding my knowledge as it were.
>
> The following url contains an example that would be useful, but I can't get it working in 3.0.22 :
>
> https://stackoverflow.com/questions/26442693/freeradius-reading-attrib
> utes-while-executing-external-script
>
> In the example Arran says :
>
> "Version 3 supports attribute assignment similar to what you've posted, but it'd be:
> update {
>    control: += `/usr/bin/php -f /web/auth.php '%{NAS-Identifier}
> %{Calling-Station-Id}'` } Then modify your script output to be:
> Auth-Type = Accept
> reply:WISPr-Bandwidth-Max-Up = xxx
> ..
> "
>
> The key question is the inclusion of "reply:" attribute in an update {
> control : } section - it would be useful to be able to update any
> pairs via exec, not just the control (in this example), as you can do
> directly via

  I'm pretty sure that doesn't work.  In v3, the "exec" parsing uses the same code path as used by the "files" module.  Which doesn't support list qualifiers.

> It's not the end of the world to have to copy the attributes from one "set" to another, but was hoping to be a bit cleaner if possible. IT's possible I just don't have the right syntax.

  Arran's wrong!

> Also happy taking advice on how best to replicate sql maps and attribute pair functionality best, possibly in python or perl I suppose, although those seem more "fixed" at a glance than exec.

  Perl in v4 still works.

  Alan DeKok.


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


********************************************************************************************************************

This message may contain confidential information. If you are not the intended recipient please inform the
sender that you have received the message in error before deleting it.
Please do not disclose, copy or distribute information in this e-mail or take any action in relation to its contents. To do so is strictly prohibited and may be unlawful. Thank you for your co-operation.

NHSmail is the secure email and directory service available for all NHS staff in England and Scotland. NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and other accredited email services.

For more information and to find out how you can switch, https://portal.nhs.net/help/joiningnhsmail




More information about the Freeradius-Users mailing list