in reply to Daemon processing under different IDs.
You can do it by twiddling $< and/or $> (see perldoc perlvar) but the process doing so would need to be started as root (since only root is allowed to change to an arbitrary uid).
Also if you've got setuid start scripts you really don't need to use sudo since each one will be run as the owner. What I'd do would be to put all the gateway users in a group and then setup sudo to allow the startup user to run sudo -u gateway1 start_gateway -f cfg/gateway1 for each gatewayn; don't even bother with setuid stuff.
And no, it's not really Perl related.
|
|---|