From 4736ba06578f860a85e84cec1c79fb126793307e Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Wed, 22 Oct 2014 14:50:09 +0200 Subject: [PATCH] updown: Explicitly pass caller PATH to updown script When invoking /bin/sh, its default PATH is used. On some systems, that does not include the PATH where the ipsec script is installed, as charon is invoked with a custom PATH. Explicitly setting the PATH of charon should fix this case, properly invoking the (default) updown script. Fixes #745. --- src/libcharon/plugins/updown/updown_listener.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcharon/plugins/updown/updown_listener.c b/src/libcharon/plugins/updown/updown_listener.c index 1d15cc55ef..be65d599f2 100644 --- a/src/libcharon/plugins/updown/updown_listener.c +++ b/src/libcharon/plugins/updown/updown_listener.c @@ -243,6 +243,7 @@ static void invoke_once(private_updown_listener_t *this, ike_sa_t *ike_sa, me = ike_sa->get_my_host(ike_sa); other = ike_sa->get_other_host(ike_sa); + push_env(envp, countof(envp), "PATH=%s", getenv("PATH")); push_env(envp, countof(envp), "PLUTO_VERSION=1.1"); is_host = my_ts->is_host(my_ts, me); if (is_host) -- 2.47.2