diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-06-27 08:15:11 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-06-27 08:15:11 +0000 |
commit | af419de789419c9e4520d33654a91564094b407a (patch) | |
tree | c62f4e0ce756cd82c32c69553c5d894d058aad07 /perl.c | |
parent | a06433151b0f1a3a12ccc4d2629feb511ea9fce6 (diff) | |
download | perl-af419de789419c9e4520d33654a91564094b407a.tar.gz |
Introduce (global) variable PL_earlytaint which
is set very early in main(), before perl_parse()
has been called and PL_tainting (or PL_taint_warn)
might have been set.
p4raw-id: //depot/perl@19863
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -154,7 +154,6 @@ perl_construct(pTHXx) if (PL_perl_destruct_level > 0) init_interp(); #endif - /* Init the real globals (and main thread)? */ if (!PL_linestr) { #ifdef PERL_FLEXIBLE_EXCEPTIONS @@ -3329,24 +3328,25 @@ S_init_ids(pTHX) /* This is used very early in the lifetime of the program, * before even the options are parsed, so PL_tainting has - * not been initialized properly.*/ -int + * not been initialized properly. The variable PL_earlytaint + * is set early in main() to the result of this function. */ +bool Perl_doing_taint(int argc, char *argv[], char *envp[]) { - int uid = PerlProc_getuid(); + int uid = PerlProc_getuid(); int euid = PerlProc_geteuid(); - int gid = PerlProc_getgid(); + int gid = PerlProc_getgid(); int egid = PerlProc_getegid(); #ifdef VMS - uid |= gid << 16; + uid |= gid << 16; euid |= egid << 16; #endif if (uid && (euid != uid || egid != gid)) return 1; - /* This is a really primitive check; $ENV{PERL_MALLOC_OPT} is - ignored only if -T are the first chars together; otherwise one - gets "Too late" message. */ + /* This is a really primitive check; environment gets ignored only + * if -T are the first chars together; otherwise one gets + * "Too late" message. */ if ( argc > 1 && argv[1][0] == '-' && (argv[1][1] == 't' || argv[1][1] == 'T') ) return 1; |