summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-27 16:20:31 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-27 16:20:31 +0000
commit26fb8f1f48b6245e35b6b73b7e98bbb26aab4dc6 (patch)
tree363a98ea6b69289cbb9761d95fc6f7dc6b332c24 /pp_sys.c
parentef75a179103f867668cdc0e80c863551b9a84c82 (diff)
downloadperl-26fb8f1f48b6245e35b6b73b7e98bbb26aab4dc6.tar.gz
make readdir() respect IOf_UNTAINT flag (allows untainting of directory
handles with: C<use IO::Handle; opendir D, $dir or die; D->untaint;> p4raw-id: //depot/perl@5285
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 6fa9c10eac..96260252ad 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));
}