[OpenVPN home] [Date Prev] [Date Index] [Date Next]
[OpenVPN mailing lists] [Thread Prev] [Thread Index] [Thread Next]
Google
 
Web openvpn.net

Re: [Openvpn-users] Openvpn port < 1024 restart


  • Subject: Re: [Openvpn-users] Openvpn port < 1024 restart
  • From: James Yonan <jim@xxxxxxxxx>
  • Date: Wed, 2 Feb 2005 11:45:40 -0700 (MST)


On Wed, 2 Feb 2005, Andrew McGill wrote:

> Hi there
> 
> QUESTION: Is there a way to configure openvpn to run in the
> foreground and still log to syslog? (--daemon does the logging to
> syslog, but also does fork() and exit()).

There isn't any way to do this right now, though the patch to add the 
feature is so trivial that I've written it up:

--- options.c   2005-01-26 13:17:32.851107832 -0600
+++ openvpn-2.0_rc10/options.c  2005-02-02 12:26:04.678006080 -0600
@@ -2813,6 +2813,13 @@
       VERIFY_PERMISSION (OPT_P_GENERAL);
       options->up_restart = true;
     }
+  else if (streq (p[0], "syslog"))
+    {
+      VERIFY_PERMISSION (OPT_P_GENERAL);
+      if (p[1])
+       ++i;
+      open_syslog (p[1], false);
+    }
   else if (streq (p[0], "daemon"))
     {
       bool didit = false;

This adds a new "syslog" option which will redirect openvpn output to the 
syslog without forking.  Like "daemon" it will accept an optional 
parameter to set the program name.

James


____________________________________________
Openvpn-users mailing list
Openvpn-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/openvpn-users