Exec module questions, v4

Alan DeKok aland at deployingradius.com
Fri Jul 31 15:15:21 CEST 2020


On Jul 31, 2020, at 9:00 AM, FRANKS, Andy (SHREWSBURY AND TELFORD HOSPITAL NHS TRUST) via Freeradius-Users <freeradius-users at lists.freeradius.org> wrote:
>  Does the exec module in v4 still support "non-xlat" use, i.e. where you stipulate a program, run it, maybe collect output pairs values?

  It should.

  The main issue is that we're using libkqueue for our event library.  And llibkqueue doesn't have good support for handling child processes.  We have patches for it, but they need to be integrated back into the main libkqueue distribution.

> Some observations
> 
> -          The stdout output "pickup" didn't seem to be consistent, here I've used radtest to fire a test auth twice in a row without changing anything (let me know if you'd like to see the complete output)

  Yes.  There are race conditions using libkqueue.  So the result from the child is sometimes picked up, and sometimes not.  :(

  We're working on fixing it.

> -          Also, the module return code isn't the same as it used to be, i.e. where 0 was ok, 1 was reject, 2 fail, as per https://networkradius.com/doc/3.0.10/raddb/mods-available/exec.html

  Ah yes... I'll push a fix.

> We used to rely on the text output, even if the exit code was non zero, and that exit code value to do some more stuff after a CoA request.

  It should still get the text output when the exit code is >= 0

> I should try modifying my unlang to do some xlats instead, but thought I'd ask first - is it just me - do I not understand deliberate changes that have taken place?

  It should behave largely the same as v3.

  Alan DeKok.




More information about the Freeradius-Users mailing list