On Thu, Nov 18, 2004 at 05:14:47PM -0800, Jev wrote: > Ok, great Paul, thank you! > > Is it this patch: > http://lists.freeradius.org/archives/freeradius-users/2004/09/frm00132.html > > that you plan to apply? Is the patch in that post the most recent? I ask > because I may attempt to apply and build it my self, so I can proceed > with some testing that I need this feature for...
That patch, with the changes described here: http://www.mail-archive.com/freeradius-users@lists.freeradius.org/msg10746.html except the line number in rlm_exec is wrong... Oh heck, here's the patch as it sits in my source tree. ^_^ (No documentation changes yet though. That'll come, but the changes are pretty much fully descriped in the above threads. Index: src/main/exec.c =================================================================== RCS file: /source/radiusd/src/main/exec.c,v retrieving revision 1.44 diff -u -r1.44 exec.c --- src/main/exec.c 12 Oct 2004 17:46:39 -0000 1.44 +++ src/main/exec.c 19 Nov 2004 02:40:46 -0000 @@ -562,5 +562,5 @@ radlog(L_ERR|L_CONS, "Exec-Program: Abnormal child exit: %s", strerror(errno)); - return 1; + return 2; } Index: src/modules/rlm_exec/rlm_exec.c =================================================================== RCS file: /source/radiusd/src/modules/rlm_exec/rlm_exec.c,v retrieving revision 1.11 diff -u -r1.11 rlm_exec.c --- src/modules/rlm_exec/rlm_exec.c 26 Feb 2004 19:04:32 -0000 1.11 +++ src/modules/rlm_exec/rlm_exec.c 19 Nov 2004 02:40:47 -0000 @@ -332,7 +332,7 @@ result = radius_exec_program(inst->program, request, inst->wait, NULL, 0, *input_pairs, &answer); - if (result != 0) { + if (result < 0) { radlog(L_ERR, "rlm_exec (%s): External script failed", inst->xlat_name); return RLM_MODULE_FAIL; @@ -347,7 +347,13 @@ pairfree(&answer); - return RLM_MODULE_OK; + if (result == 0) { + return RLM_MODULE_OK; + } + if (result > RLM_MODULE_NUMCODES) { + return RLM_MODULE_FAIL; + } + return result-1; } -- Paul "TBBle" Hampson, on an alternate email client. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html