jhanna has asked for the wisdom of the Perl Monks concerning the following question:
First is it important to switch $< as well (ie real uid)? It might be nice to preserve $< so I can switch back to root if they kill -HUP and I need to switch ports. But in the event of a perl-based vulnerability and I changed $> but not $< I suppose the clever hacker would switch $> back if possible. So I probably need to do that, right?
Secondly do I need to give the option to switch $) and $( as well (effective and real group id)? I suppose root group might be able to do something a hacker shouldn't, even after they've lost root euid, right? Furthermore $) can return a list -- if I do something like $)=$gid; die "aaack!" if $) ne $gid; would it work?
Finally, this code has to have been written 1000 times, but I couldn't find it anywhere. Can someone point me to an opensource perl server daemon that I can swipe code from? Or perhaps paste in their prized nuget from their own project with permission to recycle?
Thanks tons,
John
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Changing user and GROUP id for security?
by bronto (Priest) on Jan 26, 2003 at 20:37 UTC | |
|
Re: Changing user and GROUP id for security?
by jhanna (Scribe) on Jan 24, 2003 at 21:22 UTC | |
by jhanna (Scribe) on Jan 29, 2003 at 17:29 UTC | |
by jhanna (Scribe) on Jan 29, 2003 at 20:43 UTC |