FW: Exec module questions, v4
FRANKS, Andy (SHREWSBURY AND TELFORD HOSPITAL NHS TRUST)
andy.franks1 at nhs.net
Tue Aug 4 12:15:22 CEST 2020
Hi Alan,
Thanks for the update to the program last week, just testing here.
It seems to be taking the return code (when available) as multiple of 256 of the actual exit code, unless 0 now:
(0) testexec (yield)
(0) EXPAND /etc/freeradius/test.sh
(0) --> /etc/freeradius/test.sh
(0) Running request
(0) tmpl - Resuming execution
(0) Program failed with status code 1
(0) testexec - ERROR: Program returned invalid code (greater than max rcode) (256 > 9): (null)
(0) testexec (fail)
(0) EXPAND /etc/freeradius/test.sh
(0) --> /etc/freeradius/test.sh
(0) Running request
(0) tmpl - Resuming execution
(0) Program failed with status code 5
(0) testexec - ERROR: Program returned invalid code (greater than max rcode) (1280 > 9): (null)
(0) testexec (fail)
Another kqueue issue?
I did try libkqueue 2.4.0 , compiled from the github repo, but I guess it's in test, as it never exits, then freeradius crashes.. just in case of interest, please ignore if not;
(0) testexec (yield)
(0) EXPAND /etc/freeradius/test.sh
(0) --> /etc/freeradius/test.sh
proto_radius_udp - Received Access-Request ID 90 length 82 radius_udp server * port 1812
(1) Received Access-Request ID 90 from 127.0.0.1:52250 to 127.0.0.1:1812 length 82 via socket radius_udp server * port 1812
(1) User-Name = "123456789012"
(1) User-Password = "123456789012"
(1) NAS-IP-Address = 127.0.1.1
(1) NAS-Port = 1
(1) Message-Authenticator = 0x17c3bf3a8f0549007cf688555a0b2d7e
(1) WARNING: Discarding duplicate of request (0)
(0) ERROR: Timeout running program - killing it and failing the request
(0) Running request
(0) tmpl - Resuming execution
ASSERT FAILED src/lib/unlang/tmpl.c[316]: state->pid > 0
CAUGHT SIGNAL: Aborted
Backtrace of last 14 frames:
/usr/lib/freeradius/libfreeradius-util.so(fr_fault+0x104)[0x7efcc9d6a7cc]
/usr/lib/freeradius/libfreeradius-util.so(_fr_assert_fatal+0x0)[0x7efcc9d6b43c]
/usr/lib/freeradius/libfreeradius-unlang.so(+0x20c98)[0x7efcc9e43c98]
/usr/lib/freeradius/libfreeradius-unlang.so(+0x17de1)[0x7efcc9e3ade1]
/usr/lib/freeradius/libfreeradius-unlang.so(unlang_interpret+0x299)[0x7efcc9e3b734]
/usr/lib/freeradius/proto_radius_auth.so(+0x3079)[0x7efcc8f8a079]
/usr/lib/freeradius/libfreeradius-io.so(+0x1f737)[0x7efcc9e0f737]
/usr/lib/freeradius/libfreeradius-io.so(fr_worker_post_event+0x4d)[0x7efcc9e10480]
/usr/lib/freeradius/libfreeradius-util.so(fr_event_service+0x9b1)[0x7efcc9d80ae4]
/usr/lib/freeradius/libfreeradius-util.so(fr_event_loop+0x67)[0x7efcc9d80bea]
/usr/lib/freeradius/libfreeradius-server.so(main_loop_start+0x82)[0x7efcc9ed5be3]
freeradius(main+0x148e)[0x561e1c353bd2]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7efcc976e0b3]
freeradius(_start+0x2e)[0x561e1c3523ee]
No panic action set
Aborted
Thanks
Andy
-----Original Message-----
From: Alan DeKok <aland at deployingradius.com>
Sent: 31 July 2020 14:41
To: FreeRadius users mailing list <freeradius-users at lists.freeradius.org>
Cc: FRANKS, Andy (SHREWSBURY AND TELFORD HOSPITAL NHS TRUST) <andy.franks1 at nhs.net>
Subject: Re: Exec module questions, v4
On Jul 31, 2020, at 9:34 AM, FRANKS, Andy (SHREWSBURY AND TELFORD HOSPITAL NHS TRUST) via Freeradius-Users <freeradius-users at lists.freeradius.org> wrote:
>
> Ah, great Alan, thanks for the update. I'll maybe have a look into running it a different way, maybe through python or similar for the time being, possibly that's what people more typically do with CoA logoff requests.
If you're sending CoA packets, you can just use the radius module. There's no need to call exec!
That requires, of course, one "radius" module per CoA destination. But we're working on fixing that, too.
> Happy to also try any libkqueue patches, if that can be compiled separately.
>
> I've submitted a separate crash report about a loop on github, but I might be able to work around it too, not the right place to discuss here.
I'll take a look, thanks.
I've pushed patches which should get the correct status code, and set Module-Failure-Message when status is FAILED
Alan DeKok.
********************************************************************************************************************
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