Discussion:
[redis-db] [PATCH] Recognise LOG_DAEMON as valid syslog facility
Klemens Nanni
2018-06-28 16:43:51 UTC
Permalink
Hey,

OpenBSD's port has been running with this for quite some time now; any
chances for this to be merged?

Best regards,
Klemens

---
src/config.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/config.c b/src/config.c
index c39b61e6..6af2ef99 100644
--- a/src/config.c
+++ b/src/config.c
@@ -56,6 +56,7 @@ configEnum maxmemory_policy_enum[] = {
};

configEnum syslog_facility_enum[] = {
+ {"daemon", LOG_DAEMON},
{"user", LOG_USER},
{"local0", LOG_LOCAL0},
{"local1", LOG_LOCAL1},
@@ -298,7 +299,7 @@ void loadServerConfigFromString(char *config) {
server.syslog_facility =
configEnumGetValue(syslog_facility_enum,argv[1]);
if (server.syslog_facility == INT_MIN) {
- err = "Invalid log facility. Must be one of USER or between LOCAL0-LOCAL7";
+ err = "Invalid log facility. Must be one of DAEMON, USER or between LOCAL0-LOCAL7";
goto loaderr;
}
} else if (!strcasecmp(argv[0],"databases") && argc == 2) {
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Klemens Nanni
2018-09-02 11:33:39 UTC
Permalink
Post by Klemens Nanni
OpenBSD's port has been running with this for quite some time now; any
chances for this to be merged?
Resending as proper patch ontop of latest HEAD this time, feedback welcome.

From d816c9c2de74297c63ddda5ce50c156eb4f5d4a6 Mon Sep 17 00:00:00 2001
From: Klemens Nanni <***@openbsd.org>
Date: Sun, 2 Sep 2018 13:26:11 +0200
Subject: [PATCH 1/2] Recognise LOG_DAEMON as valid syslog(3) facility

---
src/config.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/config.c b/src/config.c
index 1a64d25e..226e9bcd 100644
--- a/src/config.c
+++ b/src/config.c
@@ -56,6 +56,7 @@ configEnum maxmemory_policy_enum[] = {
};

configEnum syslog_facility_enum[] = {
+ {"daemon", LOG_DAEMON},
{"user", LOG_USER},
{"local0", LOG_LOCAL0},
{"local1", LOG_LOCAL1},
@@ -298,7 +299,7 @@ void loadServerConfigFromString(char *config) {
server.syslog_facility =
configEnumGetValue(syslog_facility_enum,argv[1]);
if (server.syslog_facility == INT_MIN) {
- err = "Invalid log facility. Must be one of USER or between LOCAL0-LOCAL7";
+ err = "Invalid log facility. Must be one of DAEMON, USER or between LOCAL0-LOCAL7";
goto loaderr;
}
} else if (!strcasecmp(argv[0],"databases") && argc == 2) {
--
2.18.0
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Klemens Nanni
2018-10-13 10:44:04 UTC
Permalink
Post by Klemens Nanni
Post by Klemens Nanni
OpenBSD's port has been running with this for quite some time now; any
chances for this to be merged?
Resending as proper patch ontop of latest HEAD this time, feedback welcome.
Is anyone interested in this change?

We have been applying this trivial patch in our OpenBSD port[0] since
november 2014 (redis-2.8.7). It would be nice to merge this upstream so
we can drop the local modification.

Either ways, any form of feedback is greatly appreciated. See attached
the same patch rebased onto latest HEAD.

From 10723143d833201f4157cc7c92b16b1cd6d0bbd9 Mon Sep 17 00:00:00 2001
From: Klemens Nanni <***@openbsd.org>
Date: Sun, 2 Sep 2018 13:26:11 +0200
Subject: [PATCH 1/2] Recognise LOG_DAEMON as valid syslog(3) facility

---
src/config.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/config.c b/src/config.c
index 86548bc8..a2042cbc 100644
--- a/src/config.c
+++ b/src/config.c
@@ -56,6 +56,7 @@ configEnum maxmemory_policy_enum[] = {
};

configEnum syslog_facility_enum[] = {
+ {"daemon", LOG_DAEMON},
{"user", LOG_USER},
{"local0", LOG_LOCAL0},
{"local1", LOG_LOCAL1},
@@ -298,7 +299,7 @@ void loadServerConfigFromString(char *config) {
server.syslog_facility =
configEnumGetValue(syslog_facility_enum,argv[1]);
if (server.syslog_facility == INT_MIN) {
- err = "Invalid log facility. Must be one of USER or between LOCAL0-LOCAL7";
+ err = "Invalid log facility. Must be one of DAEMON, USER or between LOCAL0-LOCAL7";
goto loaderr;
}
} else if (!strcasecmp(argv[0],"databases") && argc == 2) {
--
2.19.1
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Klemens Nanni
2018-11-23 13:29:33 UTC
Permalink
Post by Klemens Nanni
We have been applying this trivial patch in our OpenBSD port[0] since
november 2014 (redis-2.8.7). It would be nice to merge this upstream so
we can drop the local modification.
Either ways, any form of feedback is greatly appreciated. See attached
the same patch rebased onto latest HEAD.
Anyone?

Newest patch attached this time.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Loading...