I created a server program that will be started as root. After it is started I want to drop privileges to another user. How can I do this securely?
I used this module. It seems to work ok. Thank you.
Peter Stuifzand
2009-05-26 12:01:03
+5
A:
You don't really need a module, although the one linked by Benji York looks pretty nice.
It's a simple matter of setting the UID via $< and $>. See perlvar for further information on these. You can also set the GID this way using $( and $).
jettero
2009-05-26 12:19:41
good point. I imagined he'd just use the drop priv module, and there's really no reason not to, or I'd have provided an example. It would look much like the source for the module though.
jettero
2009-05-26 16:44:57