antirez/redis — pull request #554 by trapni (2012-06-15 14:42:15+00:00)
Title: Implement dropping user/group privileges for redis-server.

It is not a good advice to just invoke sudo or su to run redis-server
in non-root, nor is it good to run it just as root.
However, there are environments/circumstances, where
start-stop-daemon/startproc are not meant to be used,
e.g. when writing platform independant resource agents,
or, when you have to keep the dependencies as low as possible.

This patch adds a new configuration variable "user" that gets one
string argument, and the redis-server tries to drop its
group and user privileges down to this user and this user's groups
and exits early on failure.

I would also like to get this commit cherry-picked to 2.x branches,
especially 2.2, since this is, what Ubuntu 12.04 is shipping with.