From: Gurusamy Sarathy Date: Sun, 27 Feb 2000 16:20:31 +0000 (+0000) Subject: make readdir() respect IOf_UNTAINT flag (allows untainting of directory X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=26fb8f1f48b6245e35b6b73b7e98bbb26aab4dc6;p=p5sagit%2Fp5-mst-13.2.git make readdir() respect IOf_UNTAINT flag (allows untainting of directory handles with: Cuntaint;> p4raw-id: //depot/perl@5285 --- diff --git a/pp_sys.c b/pp_sys.c index 6fa9c10..9626025 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -3462,7 +3462,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 +3477,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)); }