diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-03-13 21:20:19 -0700 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-03-13 21:20:19 -0700 |
commit | 9c811e0f2d87b84388d1a3b78865384940b30e10 (patch) | |
tree | c6614078224688b4bcf89f93eb33cee64d50bcdb | |
parent | ipc: uniformly ignore preshared keys that are zero (diff) | |
download | wireguard-tools-9c811e0f2d87b84388d1a3b78865384940b30e10.tar.xz wireguard-tools-9c811e0f2d87b84388d1a3b78865384940b30e10.zip |
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 <Jason@zx2c4.com>
Diffstat (limited to '')
-rwxr-xr-x | src/wg-quick/freebsd.bash | 2 |
1 files changed, 1 insertions, 1 deletions
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() { |