abarbarian Posted January 19, 2015 Share Posted January 19, 2015 Dodgy shell script triggers classic rm -rf / Linux desktop gamers should know of a bug in Valve's Steam client that will, if you're not careful, delete all files on your PC belonging to your regular user account. Steam for Linux can be hazardous for your PC's health The problem hasn't been sorted out and there is no sign of the Valve devs investigating this just yet, although that will probably happen very soon. Personally I always use compressed air to clean my pc 1 Quote Link to comment Share on other sites More sharing options...
securitybreach Posted January 19, 2015 Share Posted January 19, 2015 The only way that this will happen is if you moved ~/.local/share/Steam to a different directory and then launched steam. Using that code snippet was stupid anyway but Steam hasn't been able to reproduce the bug yet so this could be another BS story. It is hard to say but there have been a few in-app updates for steam in the last few days since the initial issue was reported, so it could of been fixed already. As long as you leave the folder where it belongs, you shouldn't have an issue anyway. Your data should be backed up anyway Quote Link to comment Share on other sites More sharing options...
abarbarian Posted January 22, 2015 Author Share Posted January 22, 2015 Yer right it may only affect moved folders. Doubt if it is BS as the dodgy code is part of the steam.sh. By now I would hope that it has been fixed. The code in question is this in steam.sh: # figure out the absolute path to the script being run a bit # non-obvious, the ${0%/*} pulls the path out of $0, cd's into the # specified directory, then uses $PWD to figure out where that # directory lives - and all this in a subshell, so we don't affect # $PWD STEAMROOT="$(cd "${0%/*}" && echo $PWD)" # Scary! rm -rf "$STEAMROOT/"* Yes, $STEAMROOT can end up being empty, but no check is made for that. Notice the # Scary! line, an indication the programmer knew there was the potential for catastrophe. Quote Link to comment Share on other sites More sharing options...
securitybreach Posted January 22, 2015 Share Posted January 22, 2015 Well now it says: # Check before removing if [ "$STEAMROOT" != "" ]; then rm -rf "$STEAMROOT/"* fi # Move things back into place mv -f "$STEAM_SAVE/"* "$STEAMROOT/" rmdir "$STEAM_SAVE" Quote Link to comment Share on other sites More sharing options...
abarbarian Posted January 22, 2015 Author Share Posted January 22, 2015 Looks like they did a fix then. Good job. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.