ports/security/openvpn/files/EF1.patch
Matthias Andree 7649ac1704 + Update patch set for crypto engine fix [1].
Change option name so it is presented anew, default disabled.

+ Add openvpn-client wrapper script and up/down scripts to trigger
  resolvconf, with minor edits. [2]

+ Set proper PLUGIN_LIBDIR so that plugins in the default directory can
  be found with relative paths.

+ Compile shipped plugins with -fPIC.

PR:		195004 [1]
PR:		199529 [2]
Submitted by:	yuri@rawbw.com [2]
Obtained from:	https://community.openvpn.net/openvpn/ticket/480#comment:21
2015-05-04 23:08:02 +00:00

43 lines
1.7 KiB
Diff

commit c7f3fd9c603bfd9cef600316d5e76210e6cf54a7
Author: Steffan Karger <steffan@karger.me>
Date: Thu Mar 26 01:01:29 2015 +0100
Remove unneeded parameter 'first_time' from possibly_become_daemon()
The static helper function possibly_become_daemon() is called only once,
by do_init_first_time(), which checks 'first_time' to be true before
calling possibly_become_daemon(). This makes the parameter useless.
Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1427328089-886-1-git-send-email-steffan@karger.me>
URL: http://article.gmane.org/gmane.network.openvpn.devel/9555
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 857c04ef06cd13d59c5b45332f07996e71372576)
diff --git a/src/openvpn/init.c b/src/openvpn/init.c
index 48b28fc..3a67a50 100644
--- a/src/openvpn/init.c
+++ b/src/openvpn/init.c
@@ -942,10 +942,10 @@ do_persist_tuntap (const struct options *options)
* Return true if we did it.
*/
static bool
-possibly_become_daemon (const struct options *options, const bool first_time)
+possibly_become_daemon (const struct options *options)
{
bool ret = false;
- if (first_time && options->daemon)
+ if (options->daemon)
{
ASSERT (!options->inetd);
if (daemon (options->cd_dir != NULL, options->log) < 0)
@@ -2776,7 +2776,7 @@ do_init_first_time (struct context *c)
get_pid_file (c->options.writepid, &c0->pid_state);
/* become a daemon if --daemon */
- c->did_we_daemonize = possibly_become_daemon (&c->options, c->first_time);
+ c->did_we_daemonize = possibly_become_daemon (&c->options);
/* should we disable paging? */
if (c->options.mlock && c->did_we_daemonize)