Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Process owner

by mortis (Pilgrim)
on Dec 15, 2001 at 03:27 UTC ( [id://132125]=note: print w/replies, xml ) Need Help??


in reply to Process owner

(Under Unix) I'd think $< (UID) and $> (EUID) are what you really want.

man perlvar has some more to say on the subject, as should man setuid on your (Unix) system.

EUID is what you can effectivly do - if you're EUID is root (0), you can set your UID. If it's not, you can't. Your paren't process can effect your UID before you're execed, but once you're execed, you've got your UID/EUID (and GID/EGID) for the remaining lifetime of your process.

Replies are listed 'Best First'.
Re: Re: Process owner
by belg4mit (Prior) on Dec 15, 2001 at 03:36 UTC
    $< is not what I want that is 0, the script is setuid root (# chmod u+s). $> *might* be handled correctly bysuidperl but I haven't built one to play with yet. It seems unlikely however.

    --
    perl -p -e "s/(?:\w);([st])/'\$1/mg"

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2024-04-23 15:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found