[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: discarding root privileges in suid perl



In article <84lmvpg3bz.fsf@snoopy.apana.org.au>,
Brian May  <bam@debian.org> wrote:
>According to "man perlsec", line 300+, the following code should
>destroy extra privileges in a suid root perl script:
>
>      $EUID = $UID;    
>      $EGID = $GID;    #      initgroups() also called!

You need to 'use English' for the $EUID etc variables to work.
Otherwise use $>, $<, etc. See 'man perlvar'

Mike.



Reply to: