develooper Front page | perl.perl5.porters | Postings from June 2003

Re: maint @ 19893

Thread Previous | Thread Next
From:
Nick Ing-Simmons
Date:
June 30, 2003 08:43
Subject:
Re: maint @ 19893
Message ID:
20030630154310.1894.8@bactrian.elixent.com
Nick Ing-Simmons <nick.ing-simmons@elixent.com> writes:
>
>Which will get it to compile but it won't run.
>
>Perl_doing_taint(int argc, char *argv[], char *envp[])
>{
>    dTHX;  // even if added
>    int uid  = PerlProc_getuid();
>
>}
>
>Which is redirected via interpreter's "host".
>
>So Win32 cannot call getuid() until it has an interpreter to contain a host 
>to point at function to call. 
>
>Adding the dTHX just gets a nice segfault when the NULL is de-refed.
>
>HOWEVER as:
>
>uid_t
>getuid(void)
>{
>    return ROOT_UID;
>}
>
>uid_t
>geteuid(void)
>{
>    return ROOT_UID;
>}
>
>and groups likewise (win32.c)
>
>
>A fix is probably 
>
>bool
>Perl_doing_taint(int argc, char *argv[], char *envp[])
>{
>#ifdef WIN32
>   return 0;
>#else
>...
>#endif
>}
>
>My  guess is netware is probably similar.
>
>So it might be easier to initialze PL_earlytaint = 0 
>and not add the EARLY_INIT2() stuff to platforms which don't 
>(really) "do" uid/gid.

But that gross fix if couse does not do the -T-in-argv check 


-- 
Nick Ing-Simmons
http://www.ni-s.u-net.com/


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About