]> git.ipfire.org Git - thirdparty/wireguard-tools.git/commit
wg-quick: darwin: prefer system paths for tools
authorJason A. Donenfeld <Jason@zx2c4.com>
Sun, 12 Aug 2018 07:28:28 +0000 (00:28 -0700)
committerJason A. Donenfeld <Jason@zx2c4.com>
Sun, 12 Aug 2018 07:28:28 +0000 (00:28 -0700)
commitffcc09358e98aa82f658df21cdaa4aef46b27e83
tree66a39f467490b5abf49f02f0b1cabea90f121029
parent544d965d5fd77a4d314690b678f1e9b614ad34bb
wg-quick: darwin: prefer system paths for tools

The only things wg-quick(8) needs from Homebrew are bash(1) and wg(8).
Other than that, it's explicitly coded against the native system
utilities. Since wg-quick(8) and bash(1) are invoked in auto_su by their
full absolute path (via $SELF and $BASH, respectively), we can simply
set the $PATH to be prefixed by the default system binary paths. This
way, if users install tools that conflict with system tools -- such as
GNU coreutils -- we won't accidently call those.

Reported-by: Deirdre Connolly <durumcrustulum@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
src/wg-quick/darwin.bash