mirror of
https://github.com/fluencelabs/redis
synced 2025-06-26 23:41:33 +00:00
Added a config directive for a Unix socket mask
Added a configuration directive to allow a user to specify the permissions to be granted to the Unix socket file. I followed the format Pieter and Salvatore discusses in issue #85 ( https://github.com/antirez/redis/issues/85).
This commit is contained in:
@ -74,6 +74,11 @@ void loadServerConfig(char *filename) {
|
||||
server.bindaddr = zstrdup(argv[1]);
|
||||
} else if (!strcasecmp(argv[0],"unixsocket") && argc == 2) {
|
||||
server.unixsocket = zstrdup(argv[1]);
|
||||
} else if (!strcasecmp(argv[0],"unixsocketperm") && argc == 2) {
|
||||
server.unixsocketperm = (mode_t)strtol(argv[1], NULL, 8);
|
||||
if (errno || server.unixsocketperm > 0777) {
|
||||
err = "Invalid socket file permissions"; goto loaderr;
|
||||
}
|
||||
} else if (!strcasecmp(argv[0],"save") && argc == 3) {
|
||||
int seconds = atoi(argv[1]);
|
||||
int changes = atoi(argv[2]);
|
||||
|
Reference in New Issue
Block a user