commit eca7832242d4c5cedf9e3fc7627fb1a26fc9cc5e parent d8078ada43a1a2959591f7f1c4c3f15263ef2e1b Author: Florian Dold <florian.dold@gmail.com> Date: Sun, 16 Feb 2020 19:31:46 +0100 netjail tweaks Diffstat:
| M | netjail/netjail-init.sh | | | 3 | +++ |
| M | netjail/netjail.sh | | | 2 | +- |
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/netjail/netjail-init.sh b/netjail/netjail-init.sh @@ -9,6 +9,9 @@ # set -eu +# Be extra safe, even though sudo should already do this. +export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + # Setup virtual bridge which we will use to connect all # of the builder networks to. diff --git a/netjail/netjail.sh b/netjail/netjail.sh @@ -48,4 +48,4 @@ ip netns exec "$NAME" ip route add default via 10.42.42.1 # Finally, run whatever the user's command was ME=${SUDO_USER:?must run in sudo} -exec unshare -pf -- ip netns exec "$NAME" sudo -u "$ME" -- "$@" +exec unshare -pf --mount-proc -- ip netns exec "$NAME" sudo -u "$ME" -- "$@"