From fc584f927634fe566adc1644cb57964bc63fc1ae Mon Sep 17 00:00:00 2001 From: Arran Cudbard-Bell Date: Mon, 24 Jun 2013 20:58:24 +0100 Subject: [PATCH] error if wait is not enabled and exec xlat is called --- src/modules/rlm_exec/rlm_exec.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/modules/rlm_exec/rlm_exec.c b/src/modules/rlm_exec/rlm_exec.c index aa9972801b68..1db56f54bb13 100644 --- a/src/modules/rlm_exec/rlm_exec.c +++ b/src/modules/rlm_exec/rlm_exec.c @@ -33,7 +33,7 @@ RCSID("$Id$") typedef struct rlm_exec_t { char const *xlat_name; int bare; - int wait; + bool wait; char *program; char *input; char *output; @@ -78,7 +78,13 @@ static size_t exec_xlat(void *instance, REQUEST *request, rlm_exec_t *inst = instance; VALUE_PAIR **input_pairs = NULL; char *p; - + + if (!inst->wait) { + REDEBUG("'wait' must be enabled to use exec xlat"); + out[0] = '\0'; + return 0; + } + if (inst->input_list) { input_pairs = radius_list(request, inst->input_list); if (!input_pairs) {