From: Jarkko Hietaniemi Date: Fri, 27 Jun 2003 08:18:47 +0000 (+0000) Subject: Use the PL_earlytaint. (PL_earlytaint is a global, X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ed085813cee9c22e7ad548a324c6d8f6d7d726d2;p=p5sagit%2Fp5-mst-13.2.git Use the PL_earlytaint. (PL_earlytaint is a global, not per-interp, since perl_construct() is not passed the argc, argv, and therefore it can't set the per-interp PL_tainting.) p4raw-id: //depot/perl@19864 --- diff --git a/perl.c b/perl.c index f40aaa5..badb216 100644 --- a/perl.c +++ b/perl.c @@ -279,7 +279,7 @@ perl_construct(pTHXx) { char *s = NULL; - if (!PL_tainting) + if (!PL_earlytaint) s = PerlEnv_getenv("PERL_HASH_SEED"); if (s) while (isSPACE(*s)) s++; @@ -301,7 +301,7 @@ perl_construct(pTHXx) #endif /* RANDBITS < (UVSIZE * 8) */ } #endif /* USE_HASH_SEED_EXPLICIT */ - if (!PL_tainting && (s = PerlEnv_getenv("PERL_HASH_SEED_DEBUG"))) + if (!PL_earlytaint && (s = PerlEnv_getenv("PERL_HASH_SEED_DEBUG"))) PerlIO_printf(Perl_debug_log, "HASH_SEED = %"UVuf"\n", PL_hash_seed); } diff --git a/perl.h b/perl.h index 492bd83..ea55630 100644 --- a/perl.h +++ b/perl.h @@ -499,7 +499,7 @@ int usleep(unsigned int); panic_write2("panic: tainting with $ENV{PERL_MALLOC_OPT}\n");\ exit(1); }) # define MALLOC_CHECK_TAINT(argc,argv,env) STMT_START { \ - if (Perl_doing_taint(argc,argv,env)) { \ + if (PL_earlytaint)) { \ MallocCfg_ptr[MallocCfg_skip_cfg_env] = 1; \ }} STMT_END; #else /* MYMALLOC */