aports/community/radsecproxy/dont-ignore-logdestination-in-foreground.patch
2024-07-05 16:22:23 +00:00

41 lines
1.5 KiB
Diff

From: Josef Vybíhal <joef.vybihal@gmail.com>
Date: Wed, 27 Oct 2021 19:55:52 +0200
Subject: [PATCH] Don't ignore logdestination option when started in foreground
Original-From: Jakub Jirutka <jakub@jirutka.cz>
...but ignore it when started with pretend (-p).
--- a/radsecproxy.8.in
+++ b/radsecproxy.8.in
@@ -36,7 +36,7 @@ where some RADIUS nodes use only IPv4 and some only IPv6.
Run in foreground.
.br
By specifying this option, the proxy will run in foreground mode. That
-is, it won't detach. Also all logging will be done to stderr.
+is, it won't detach.
.TP
.B \-d \fIdebuglevel\fR
@@ -52,7 +52,7 @@ The proxy reads configuration files and performs initialisation as
usual, but exits prior to creating any sockets. It will return different
exit codes depending on whether the configuration files are okay. This
may be used to verify configuration files, and can be done while another
-instance is running.
+instance is running. Also all logging will be done to stderr.
.TP
.B \-v
diff --git a/radsecproxy.c b/radsecproxy.c
index 3eb5c50..56c3822 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -3632,7 +3632,7 @@ int radsecproxy_main(int argc, char **argv) {
options.loglevel = loglevel;
else if (options.loglevel)
debug_set_level(options.loglevel);
- if (!foreground) {
+ if (!pretend) { // XXX-Patched
debug_set_destination(options.logdestination
? options.logdestination
: "x-syslog:///",