- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
By "DRM Client" did you mean "EVE Online"?
Admin
Admin
FTFY.
"laoreet" -- That system admin is at it again!
Admin
I was lucky so far - all companies I have worked for accepted that to make mistakes is human, nobody threw things around or gave an army drill inspector impersonation.
That is not to say they didn't care - if you would have made the same mistake over and over again, they would have given you the friendly advice to seek employment elsewhere or would have sacked you right away.
But all team leads or department heads knew that the first weeks into a new job you need some puppy licence, especially if you come from some completely different field of software development (lousiest experience: spending most of an unwanted saturday shift watching a five-hour recompile taking place due to a wrong call of the build script).
Actually, thinking about it again, TRWTF is that the shell script exists at all. A binary having to call a shell script to set modes and ownership of a couple of files? What a roundabout way to do things! Even on a Mac, you could probably do this from the binary as well.Admin
I just have that kind of time ...
I just spent 12 hours rebuilding my production server which host all websites of my clients: a typo in the new backup script ruined my night and the beginning of the day.
Instead of replicating the entire server tree to an empty folder on a NAS via ftp, he copied the structure of the empty folder to my server.
I've realized that after 15 seconds, but it was too late ... Missing /usr/bin and several other pretty things ...
Admin
My favorite was a script that changed into a particular directory, and ran "rm -rf *" to remove the contents. Unfortunately, the script didn't allow for the possibility that the directory might not exist, the "cd" might fail, and that as a result, it would remove the contents of whatever directory the user was in when they ran it.
Admin
In a project I did last year that didn't go anywhere (but many of the code improvements were merged back into a 2.0 of the previous project), it ran under Linux, and the only time I called up another binary was to set the system hardware clock. That was in a separate binary specifically to keep the chown root stuff limited in scope (and so I didn't have to dick with 'sudo chown root' every time I built the main project), and it was started with an execl() call.
Admin
The easy solution to that is to just not install Java in the first place.
Admin
Then DON'T uninstall them. And thank Microsoft for making such fragile system.
Captcha - wisi. I am wisi Penguin so listen to me.
Admin
Much, muuuuuuuch more fragile than the system described in today's article.
Admin
Ark (KDE's archiving tool) can open RPMs and unpack them to directory you want (even subdir of /home) so your argument is invalid. You'll need a bit fiddle with env variables, but you should be able to get it working.
Admin
Then how will I play Minecraft when recompiling my kernel on another machine?
Admin
That being said, package managers generally don't work without root, which means you're back into the land of resolving dependencies manually unless you have one of the exceptions available. Which is about as fun as amputating your leg with a rusty fork.
Admin
Admin
Admin
Well, that brought back some memories. I remember during my days at University I wrote a little shell script call "rr" (russian roulette). When invoked, it would look up all executables you had access to (binaries, scripts, etc), pick one at random and execute it with the parameters "-rf /".
Yes, this was before the "rm" sanity checks were introduced.
Admin
Were they installing Barmin's patch?
Admin
Admin
There is - http://www.rpm.org/max-rpm-snapshot/s1-rpm-install-additional-options.html
You may run into problems if the package maintainer didn't take into account that you can do that and used hardcoded paths in the setup scripts...
Admin
That code does not do what it appears to want to do.
First of all, there is no reason for two separate chmods. "chmod 4755..." would do them both.
The other thing is that, at least on Linux, "chown" resets the SUID bit, which means that the second line is canceled by the third.
Shachar
Admin
So what's wrong with it? From a DRM perspective it's perfect: No one will be copying anything with that system after the install.
Admin
https://github.com/MrMEEE/bumblebee-Old-and-abbandoned/commit/a047be85247755cdbe0acce6f1dafc8beb84f2ac
Admin
What wasn't stated is that Benjamo's friend was the president's daughter. He wanted to quickly impress her and didn't have no time to do no investigation (she's sick, remember).
So he quickly attempted 'sudo make me a sandwich'. Hilarity ensues. Hilarity quickly ceases as TPD is still sick (is her sickness related to the DRM? Is it a DRM sickness? Is the cure "protected" by DRM? We need answers!).
CAPTCHA: validus - running unknown stuff as root is solution validus only when in emergency
Admin
Admin
I actually liked Steve's reply, regexes are much more concise than calls like "months".replace("years").
Admin
If you want to use it with bash: set -u (or the longer form: set -o nounset).
Admin
At my current job a vendor script did rm -f $x/* without x defined.
At my first job, "I knew something was wrong when I typed vi and it said command not found." done by the actually very smart daughter of the company owners on a dev box, fortunately.
Admin
You also are still A WTF SCAMMER!!!!!!!!!
Admin
Admin
Sorry to hear about your Asperger's.
Admin
I guess every way requires a certain amount of trust in whoever coded the installer program/script. Hadn't really thought of it that much.
Admin
How so?
Also, wouldn't it be
?
Admin
What's Asperger's?
Admin
That still shouldn't of had been that bad of an issue even with sudo/elevated priveleges. OS X won't nuke the f/s w/o --no-preserve-root.
On an older jailbroken iPhone i ran rm -rf / intentionally and it didn't do anything unless I gave it that argument, OS X is practically the same thing.
Admin
So one day we got a new server at work. I followed this process (give or take - it was about 7 years ago now):
TL;DR = steps 6 - 8 are the critical mistake I made.
Admin
Any system with sh or sh-derived scripts has that problem, and there are plenty of idiots out there. When learning bash, there should be a note in large letters at the beginning: it's always safer two quote tokens (not just parameters) than not to.
Admin
I now have a procedure in place for this situation:
That way, if I do mess it up, it's just a comment. Many times I forget that, and bitch that the command doesn't work, before realising there's a hash in front of it.
Many times I need to run several other commands to find out what needs to be added to the command, so the incomplete comment is also helpfully stored in my bash history, which I can access with Control+R or the arrow keys, to be completed later.