X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/51894f20e0c03113b4c4e07898ac5e955b21ec41..3f77bd134b64c532748b83c3931df07058268b5e:/src/src/routers/queryprogram.c diff --git a/src/src/routers/queryprogram.c b/src/src/routers/queryprogram.c index 2a6a73eb6..39645cd23 100644 --- a/src/src/routers/queryprogram.c +++ b/src/src/routers/queryprogram.c @@ -8,6 +8,8 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ #include "../exim.h" + +#ifdef ROUTER_QUERYPROGRAM /* Remainder of file */ #include "rf_functions.h" #include "queryprogram.h" @@ -287,6 +289,7 @@ if (curr_uid != root_uid && (uid != curr_uid || gid != curr_gid)) /* Set up the command to run */ +GET_OPTION("command"); if (!transport_set_up_command(&argvptr, /* anchor for arg list */ ob->command, /* raw command */ TSUC_EXPAND_ARGS, /* arguments expanded but must not be tainted */ @@ -360,10 +363,10 @@ buffer[len] = 0; DEBUG(D_route) debug_printf("command wrote: %s\n", buffer); rword = buffer; -while (isspace(*rword)) rword++; +Uskip_whitespace(&rword); rdata = rword; -while (*rdata && !isspace(*rdata)) rdata++; -if (*rdata) *rdata++ = 0; +Uskip_nonwhite(&rdata); +if (*rdata) *rdata++ = '\0'; /* The word must be a known yield name. If it is "REDIRECT", the rest of the line is redirection data, as for a .forward file. It may not contain filter @@ -534,5 +537,6 @@ addr->prop = addr_prop; return rf_queue_add(addr, addr_local, addr_remote, rblock, pw) ? OK : DEFER; } -#endif /*!MACRO_PREDEF*/ +#endif /*!MACRO_PREDEF*/ +#endif /*ROUTER_QUERYPROGRAM*/ /* End of routers/queryprogram.c */