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>
This commit is contained in:
parent
4e4867dc95
commit
9c811e0f2d
|
@ -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() {
|
||||
|
|
Reference in New Issue