diff options
Diffstat (limited to 'taint.c')
-rw-r--r-- | taint.c | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -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); |