]> www.infradead.org Git - users/dwmw2/openconnect.git/commit
Provide the vpnc-script with our PID (as $VPNPID)
authorDaniel Lenski <dlenski@gmail.com>
Thu, 16 Sep 2021 19:51:43 +0000 (12:51 -0700)
committerDaniel Lenski <dlenski@gmail.com>
Thu, 16 Sep 2021 20:13:32 +0000 (13:13 -0700)
commite22750234dd78b32701dcd51dc42adfbd45d0e1b
treeb0c82e7f258cf7219dbc9ef3b9cd459714294eb3
parentb24f806b0df36c60517cb9846d49e7ad219cfede
Provide the vpnc-script with our PID (as $VPNPID)

This will enable a vpnc-script to more easily identify which VPN connection
is calling it, in the case of multiple concurrent or "stacked" VPN
connections.

Because OpenConnect (and vpnc) invoke the vpnc-script via an intermediate
shell process, the vpnc-script would otherwise need to determine its
GRANDparent PID, which is an error-prone, and not easily portable, process.
See https://gitlab.com/openconnect/vpnc-scripts/-/issues/28 and
https://gitlab.com/openconnect/vpnc-scripts/-/merge_requests/36 for issues
with the current approaches.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
script.c