summaryrefslogtreecommitdiff
path: root/taint.c
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>1998-07-18 13:53:03 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>1998-07-18 13:53:03 +0000
commit3280af22f58e7b37514ed104858e2c2fc55ceeeb (patch)
tree8fd8328859f022068272656f072a7ec4eecac0a6 /taint.c
parentef6361f9c2260919aefcc17b1b80f8857c67a84a (diff)
downloadperl-3280af22f58e7b37514ed104858e2c2fc55ceeeb.tar.gz
PL_ prefix to all perlvars, part1
Builds and passes all tests at one limit i.e. -DPERL_GLOBAL_STRUCT p4raw-id: //depot/ansiperl@1532
Diffstat (limited to 'taint.c')
-rw-r--r--taint.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/taint.c b/taint.c
index 3ce09423d8..88ca8a5a48 100644
--- a/taint.c
+++ b/taint.c
@@ -14,18 +14,18 @@ taint_proper(const char *f, char *s)
char *ug;
DEBUG_u(PerlIO_printf(Perl_debug_log,
- "%s %d %d %d\n", s, tainted, uid, euid));
+ "%s %d %d %d\n", s, PL_tainted, PL_uid, PL_euid));
- if (tainted) {
- if (euid != uid)
+ if (PL_tainted) {
+ if (PL_euid != PL_uid)
ug = " while running setuid";
- else if (egid != gid)
+ else if (PL_egid != PL_gid)
ug = " while running setgid";
else
ug = " while running with -T switch";
- if (!unsafe)
+ if (!PL_unsafe)
croak(f, s, ug);
- else if (dowarn)
+ else if (PL_dowarn)
warn(f, s, ug);
}
}
@@ -68,7 +68,7 @@ taint_env(void)
}
#endif /* VMS */
- svp = hv_fetch(GvHVn(envgv),"PATH",4,FALSE);
+ svp = hv_fetch(GvHVn(PL_envgv),"PATH",4,FALSE);
if (svp && *svp) {
if (SvTAINTED(*svp)) {
dTHR;
@@ -84,13 +84,13 @@ taint_env(void)
#ifndef VMS
/* tainted $TERM is okay if it contains no metachars */
- svp = hv_fetch(GvHVn(envgv),"TERM",4,FALSE);
+ svp = hv_fetch(GvHVn(PL_envgv),"TERM",4,FALSE);
if (svp && *svp && SvTAINTED(*svp)) {
dTHR; /* just for taint */
- bool was_tainted = tainted;
- char *t = SvPV(*svp, na);
- char *e = t + na;
- tainted = was_tainted;
+ bool was_tainted = PL_tainted;
+ char *t = SvPV(*svp, PL_na);
+ char *e = t + PL_na;
+ PL_tainted = was_tainted;
if (t < e && isALNUM(*t))
t++;
while (t < e && (isALNUM(*t) || *t == '-' || *t == ':'))
@@ -103,8 +103,8 @@ taint_env(void)
#endif /* !VMS */
for (e = misc_env; *e; e++) {
- svp = hv_fetch(GvHVn(envgv), *e, strlen(*e), FALSE);
- if (svp && *svp != &sv_undef && SvTAINTED(*svp)) {
+ svp = hv_fetch(GvHVn(PL_envgv), *e, strlen(*e), FALSE);
+ if (svp && *svp != &PL_sv_undef && SvTAINTED(*svp)) {
dTHR; /* just for taint */
TAINT;
taint_proper("Insecure $ENV{%s}%s", *e);