X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/35d40a980556bac0460dc027a44fb5285cda3364..93a680e4c9c899d86ff3fde0933fb5367b34af50:/src/src/perl.c diff --git a/src/src/perl.c b/src/src/perl.c index 4cbcec7f5..fbe9ee842 100644 --- a/src/src/perl.c +++ b/src/src/perl.c @@ -1,5 +1,3 @@ -/* $Cambridge: exim/src/src/perl.c,v 1.5 2006/07/14 14:32:09 ph10 Exp $ */ - /************************************************* * Exim - an Internet mail transport agent * *************************************************/ @@ -15,6 +13,7 @@ /* This Perl add-on can be distributed under the same terms as Exim itself. */ /* See the file NOTICE for conditions of use and distribution. */ +#include #include "exim.h" #define EXIM_TRUE TRUE @@ -97,11 +96,17 @@ static void xs_init(pTHX) uschar * init_perl(uschar *startup_code) { - static int argc = 2; - static char *argv[3] = { "exim-perl", "/dev/null", 0 }; + static int argc = 1; + static char *argv[4] = { "exim-perl" }; SV *sv; STRLEN len; + if (opt_perl_taintmode) argv[argc++] = "-T"; + argv[argc++] = "/dev/null"; + argv[argc] = 0; + + assert(sizeof(argv)/sizeof(argv[0]) > argc); + if (interp_perl) return 0; interp_perl = perl_alloc(); perl_construct(interp_perl);