-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
Currently, iproute2 is called in two ways on linux:
- via
routeCommand(on Linux that is set to= "/sbin/ip") - and via path-lookup (
shell.Exec(log, "ip", ...), indaemon/vpn/wireguard/wireguard_linux.goanddaemon/v2r/v2ray_linux.go)
If ip is not in PATH but is present in /sbin/, this can cause confusing errors where it finds ip in some cases but not others.
This is a very niche issue, but we encountered this specific issue in the Nix packaging of ivpn, where we have to patch in a hardcoded path to the ip command (because standard FHS paths don't exist in Nix), while the PATH is kept very minimal. See here for more context: NixOS/nixpkgs#474377
I'd propose either changing all the path-lookups to use /sbin/ instead, or use routeCommand and introduce a second one for ip link (as used in wireguard_linux.go)
Metadata
Metadata
Assignees
Labels
No labels