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,
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. */
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));
}
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));
}