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

Don't make the real $HOME available to the app even if it is $PWD

parent 98d7adaa
No related branches found
No related tags found
No related merge requests found
......@@ -105,7 +105,8 @@ usage () {
echo
echo "Run COMMAND [ARGS...] in a container that protects \$HOME."
echo
echo "The current working directory will be writeable for COMMAND."
echo "The current working directory will be writeable for COMMAND,"
echo "unless it is the real home directory."
echo
echo "Options:"
echo "--steam-app-id=123 Use ~/.var/app/com.steampowered.App123"
......@@ -254,7 +255,13 @@ fi
# Make sure the current working directory (the game we are going to
# run) is available. Some games write here.
PWD="$(pwd)"
set -- --bind "$PWD" "$PWD" --chdir "$PWD" "$@"
if test "$HOME" -ef "$PWD"; then
echo "$me: Not making real $PWD available to container because it is" \
"the home directory" >&2
else
set -- --bind "$PWD" "$PWD" "$@"
fi
set -- --chdir "$PWD" "$@"
# We need libraries from the Steam Runtime, so make sure that's visible
# (it should never need to be read/write though)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment