This patch allows users to put a username (and optionally a group name) in
their config file; after daemonizing umurmur will then switch to the given uid
and gid.
If username is set in the config file but group name isn't, then umurmur will
just use the given user's login group.
I've chosen to only drop privileges in daemon mode since we also only write the
PID file in daemon mode, too. PID files usually go in /var/run, which is only
writable by root. So having privilege-dropping in the same code path as writing
the PID file seems to make sense (and the order is important obviously).
-> In a future patch, we could write the PID file and drop privileges even if
daemonization is disabled, I think.
Original issue reported on code.google.com by tilm...@googlemail.com on 20 Jan 2011 at 8:56
Original issue reported on code.google.com by
tilm...@googlemail.com
on 20 Jan 2011 at 8:56Attachments: