X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pp_sys.c;h=3429c45d563640507df3f775fa3e685595ef48c5;hb=706de38c2aa2b981f7071fda099501bf2cc8caeb;hp=6fa9c10eac9d44999d412578882f09c0513c42f3;hpb=2841d78411ddadd05a6fbe13e0be06f765fad3fb;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pp_sys.c b/pp_sys.c index 6fa9c10..3429c45 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -359,6 +359,9 @@ PP(pp_glob) ENTER; #ifndef VMS + /* If we're not using an external glob, just let readdir() tainting + * do its thing. Otherwise, engage paranoia mode. */ +#if defined(PERL_EXTERNAL_GLOB) if (PL_tainting) { /* * The external globbing program may use things we can't control, @@ -367,6 +370,7 @@ PP(pp_glob) TAINT; taint_proper(PL_no_security, "glob"); } +#endif /* PERL_EXTERNAL_GLOB */ #endif /* !VMS */ SAVESPTR(PL_last_in_gv); /* We don't want this to be permanent. */ @@ -3462,7 +3466,8 @@ PP(pp_readdir) sv = newSVpv(dp->d_name, 0); #endif #ifndef INCOMPLETE_TAINTS - SvTAINTED_on(sv); + if (!(IoFLAGS(io) & IOf_UNTAINT)) + SvTAINTED_on(sv); #endif XPUSHs(sv_2mortal(sv)); } @@ -3476,7 +3481,8 @@ PP(pp_readdir) sv = newSVpv(dp->d_name, 0); #endif #ifndef INCOMPLETE_TAINTS - SvTAINTED_on(sv); + if (!(IoFLAGS(io) & IOf_UNTAINT)) + SvTAINTED_on(sv); #endif XPUSHs(sv_2mortal(sv)); }