Skip to content
Snippets Groups Projects
Commit 5a577d5c authored by Simon McVittie's avatar Simon McVittie
Browse files

wrap: Don't use /run/host when not using a runtime

parent 6f60db81
No related branches found
No related tags found
No related merge requests found
...@@ -678,10 +678,15 @@ for preload in $ld_preload; do ...@@ -678,10 +678,15 @@ for preload in $ld_preload; do
if [ -e "$preload" ]; then if [ -e "$preload" ]; then
case "$preload" in case "$preload" in
(/usr/*|/lib*) (/usr/*|/lib*)
# We can't write here, so redirect them to the if [ -n "$runtime" ]; then
# corresponding locations in /run/host # We can't write here, so redirect them to the
bwrap_options+=(--ro-bind "$preload" "/run/host$preload") # corresponding locations in /run/host
adjusted_ld_preload="${adjusted_ld_preload:+"$adjusted_ld_preload:"}/run/host$preload" bwrap_options+=(--ro-bind "$preload" "/run/host$preload")
adjusted_ld_preload="${adjusted_ld_preload:+"$adjusted_ld_preload:"}/run/host$preload"
else
bwrap_options+=(--ro-bind "$preload" "$preload")
adjusted_ld_preload="${adjusted_ld_preload:+"$adjusted_ld_preload:"}$preload"
fi
;; ;;
(*) (*)
bwrap_options+=(--ro-bind "$preload" "$preload") bwrap_options+=(--ro-bind "$preload" "$preload")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment