http://qs321.pair.com?node_id=57632


in reply to change process's effective uid

Ahh yes. Wise question Anonymous One. Perl is far beyond using function calls for this. Why use function calls when we have variables like $< and $> ?!?!

$< or $UID
"The real user ID of this process."

$>
$EUID
"The effective uid of this process"

Thus speaks the Holy Camel Book of Knowledge Light of the World.
so...

$< = $> #set real to effective uid ($<,$>) = ($>,$<); #swap real and effective uid
Obviously, these require you to be running setuid.Go and rejoice in your new learning.
---
crulx
crulx@iaxs.net