Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Calling a setuid script in a perl script

by mbethke (Hermit)
on Nov 18, 2011 at 17:00 UTC ( [id://938883]=note: print w/replies, xml ) Need Help??


in reply to Re: Calling a setuid script in a perl script
in thread Perl Setuid - Oracle Password Hardcoding

I assume the OP wants it as an extra suid script because it must read a file the main script has no permissions for, and it makes complete sense to keep the suid portions of a script as small as possible. Making the whole thing a module would defeat this purpose.

If I understood this correctly, the solution is very easy:

$password = `getPwd.pl`; chomp $password;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-20 15:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found