aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-03-13 21:20:19 -0700
committerJason A. Donenfeld <Jason@zx2c4.com>2021-03-13 21:20:19 -0700
commit9c811e0f2d87b84388d1a3b78865384940b30e10 (patch)
treec6614078224688b4bcf89f93eb33cee64d50bcdb
parentipc: uniformly ignore preshared keys that are zero (diff)
downloadwireguard-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>
-rwxr-xr-xsrc/wg-quick/freebsd.bash2
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() {