daemon: added "group" configuration option
The "group" configuration option is similar to "user" as it sets user set what group MPD shall run as. With "user" option, MPD changed GID to the GID of the user, however, more control could be desired. Moreover, the patch changes the way of checking whether no setuid(2)/setgid(2) is required -- previously user names were compered, now UID and GIDs are compered (ie. the one we already have (getuid(2)/getgid(2)) with the one we want to change to).
This commit is contained in:

committed by
Max Kellermann

parent
4100035b19
commit
d718a8b59d
@@ -23,7 +23,7 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
void
|
||||
daemonize_init(const char *user, const char *pidfile);
|
||||
daemonize_init(const char *user, const char *group, const char *pidfile);
|
||||
|
||||
void
|
||||
daemonize_finish(void);
|
||||
|
Reference in New Issue
Block a user