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 () { ...@@ -105,7 +105,8 @@ usage () {
echo echo
echo "Run COMMAND [ARGS...] in a container that protects \$HOME." echo "Run COMMAND [ARGS...] in a container that protects \$HOME."
echo 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
echo "Options:" echo "Options:"
echo "--steam-app-id=123 Use ~/.var/app/com.steampowered.App123" echo "--steam-app-id=123 Use ~/.var/app/com.steampowered.App123"
...@@ -254,7 +255,13 @@ fi ...@@ -254,7 +255,13 @@ fi
# Make sure the current working directory (the game we are going to # Make sure the current working directory (the game we are going to
# run) is available. Some games write here. # run) is available. Some games write here.
PWD="$(pwd)" 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 # We need libraries from the Steam Runtime, so make sure that's visible
# (it should never need to be read/write though) # (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.
Finish editing this message first!
Please register or to comment