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"