Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: suid Perl with App::PAR::Packer (pp)

by Anonymous Monk
on Oct 13, 2013 at 20:05 UTC ( #1058100=note: print w/ replies, xml ) Need Help??


in reply to Re^2: suid Perl with App::PAR::Packer (pp)
in thread suid Perl with App::PAR::Packer (pp)

Since the changes were across multiple files and I can't exactly zip them up and share them here,

Do a make realclean in respective directories and then  diff -ruN orig-pars-dists new-pars-dists


Comment on Re^3: suid Perl with App::PAR::Packer (pp)
Download Code
Re^4: suid Perl with App::PAR::Packer (pp)
by Tommy (Chaplain) on Oct 14, 2013 at 04:12 UTC

    Dear, Anonymous Monk. I did what you asked and put the diff up as a gist on github.

    It's here: https://gist.github.com/tommybutler/6970628

    Please read the notes on the patch before using it, because it notes that the build helper script had to be changed in order to make it work (by removing the --clean option when calling pp). I added crypto filters to the compiled executable for better security, given that it is suid. I also put into the BEGIN block of the script an instant-exit if $< isn't my uid.

    The updated (fixed) build helper script:

    #!/bin/bash sudo rm -rf /tmp/par* && sudo rm -rf suid_script && pp --output=suid_script -f Crypto -F Crypto -M Filter::Crypto::Decrypt + suid_script.pl && sudo chown root:root suid_script && sudo chmod +x suid_script && sudo chmod u+s suid_script && stat suid_script && rm -rf /tmp/par*

     

    Tommy
    A mistake can be valuable or costly, depending on how faithfully you pursue correction

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1058100]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (18)
As of 2014-09-02 15:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (25 votes), past polls