Skip to content

Commit af8046d

Browse files
committed
BUG: Ensure binary executable to run is available in the sandbox
1 parent 6f74eff commit af8046d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sandbox-run

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if [ "${bin##*/}" != 'sandbox-run' ]; then
1616
else
1717
if [ "$#" -eq 0 ]
1818
then echo "Usage: ${0##*/} ARG..."; exit 1
19-
else bin="$1"; shift
19+
else bin="$(command -v "$1")"; shift
2020
fi
2121
fi
2222

@@ -104,6 +104,7 @@ bwrap \
104104
--symlink /usr/bin /bin \
105105
--symlink /usr/bin /sbin \
106106
--dev-bind-try /dev/fuse /dev/fuse \
107+
--ro-bind "$bin" "$bin" \
107108
$(set +x; for path in $paths; do [ ! -e "$path" ] || printf -- '--ro-bind-try %s %s ' "$path" "$path"; done) \
108109
--bind "$cwd" "$cwd" \
109110
--chdir "$cwd" \

0 commit comments

Comments
 (0)