From: Jason A. Donenfeld Date: Sun, 14 Mar 2021 04:20:19 +0000 (-0700) Subject: wg-quick: freebsd: avoid writing private keys to /tmp X-Git-Tag: v1.0.20210315~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9c811e0f2d87b84388d1a3b78865384940b30e10;p=thirdparty%2Fwireguard-tools.git wg-quick: freebsd: avoid writing private keys to /tmp FreeBSD's bash doesn't handle <(...) safely, creating a temporary file instead of using /proc/self/fd/N like on Linux. Work around this by using a simple pipeline with /dev/stdin. Signed-off-by: Jason A. Donenfeld --- diff --git a/src/wg-quick/freebsd.bash b/src/wg-quick/freebsd.bash index c6744d3..88aa2b4 100755 --- a/src/wg-quick/freebsd.bash +++ b/src/wg-quick/freebsd.bash @@ -349,7 +349,7 @@ add_route() { } set_config() { - cmd wg setconf "$INTERFACE" <(echo "$WG_CONFIG") + echo "$WG_CONFIG" | cmd wg setconf "$INTERFACE" /dev/stdin } save_config() {