Jump to content


Valve Steam CLEANS Linux PCs

steam valve delete

  • Please log in to reply
4 replies to this topic

#1 OFFLINE   abarbarian

abarbarian

    Thread Kahuna

  • Forum MVP
  • 5,607 posts

Posted 19 January 2015 - 06:56 PM

Dodgy shell script triggers classic rm -rf /

Quote

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


Quote

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 :harhar:  I always use compressed air to clean my pc
Install ARCH
You'll never need to install it again
"I did and I'm really happy"

Posted Image~~~~~~~~~~~~~Posted Image

#2 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 23,743 posts

Posted 19 January 2015 - 07:33 PM

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 ;)

B)
Posted ImagePosted Image Posted Image
CNI Radio/G+ Profile/Configs/PGP Key/comhack π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#3 OFFLINE   abarbarian

abarbarian

    Thread Kahuna

  • Forum MVP
  • 5,607 posts

Posted 22 January 2015 - 07:01 AM

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.




Quote

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.

:fish:
Install ARCH
You'll never need to install it again
"I did and I'm really happy"

Posted Image~~~~~~~~~~~~~Posted Image

#4 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 23,743 posts

Posted 22 January 2015 - 10:37 AM

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"

Posted ImagePosted Image Posted Image
CNI Radio/G+ Profile/Configs/PGP Key/comhack π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#5 OFFLINE   abarbarian

abarbarian

    Thread Kahuna

  • Forum MVP
  • 5,607 posts

Posted 22 January 2015 - 10:42 AM

Looks like they did a fix then. Good job.  :clap:
Install ARCH
You'll never need to install it again
"I did and I'm really happy"

Posted Image~~~~~~~~~~~~~Posted Image





Also tagged with one or more of these keywords: steam, valve, delete

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users