summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2014-03-21 14:18:35 +0100
committerGert Doering <gert@greenie.muc.de>2014-03-21 19:38:11 +0100
commitac1c2f259b44d1229a65a3e639b09d57a4e2a53b (patch)
tree675c2bd50bb88acb2fe4647555de83e51d831d3c
parent5118787158eb6fafa3bfef9cb87acb1c76264a90 (diff)
downloadopenvpn-ac1c2f259b44d1229a65a3e639b09d57a4e2a53b.tar.gz
openvpn-ac1c2f259b44d1229a65a3e639b09d57a4e2a53b.tar.xz
openvpn-ac1c2f259b44d1229a65a3e639b09d57a4e2a53b.zip
Move the initialization of the environment to the top so c2.es is initialized
Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <1395407925-25518-3-git-send-email-arne@rfc2549.org> URL: http://article.gmane.org/gmane.network.openvpn.devel/8372 Signed-off-by: Gert Doering <gert@greenie.muc.de>
-rw-r--r--src/openvpn/init.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/openvpn/init.c b/src/openvpn/init.c
index 3b72b96..c50b5c2 100644
--- a/src/openvpn/init.c
+++ b/src/openvpn/init.c
@@ -3339,6 +3339,10 @@ init_instance (struct context *c, const struct env_set *env, const unsigned int
/* init garbage collection level */
gc_init (&c->c2.gc);
+ /* inherit environmental variables */
+ if (env)
+ do_inherit_env (c, env);
+
/* signals caught here will abort */
c->sig->signal_received = 0;
c->sig->signal_text = NULL;
@@ -3390,10 +3394,6 @@ init_instance (struct context *c, const struct env_set *env, const unsigned int
if (c->mode == CM_P2P || c->mode == CM_TOP)
do_option_warnings (c);
- /* inherit environmental variables */
- if (env)
- do_inherit_env (c, env);
-
#ifdef ENABLE_PLUGIN
/* initialize plugins */
if (c->mode == CM_P2P || c->mode == CM_TOP)