• Ken B (unregistered) in reply to dkf
    dkf:
    # FOXME: clean up comments for release
    Oh, the delicious failure!
    No, no, no! What you don't realize is that the comments were cleaned up! I'd hate to see what the original comments looked like.
  • Theo (unregistered) in reply to Ken B
    Ken B:
    dkf:
    # FOXME: clean up comments for release
    Oh, the delicious failure!
    No, no, no! What you don't realize is that the comments were cleaned up! I'd hate to see what the original comments looked like.

    Those comments weren't, because cleaner looked for FIXME and overlooked this file.

  • Jan (unregistered)

    Nobody seems to have picked up on one thing - why does a DSL router run stunnel???

    http://stunnel.mirt.net/ "The stunnel program is designed to work as an SSL encryption wrapper between remote client and local (inetd-startable) or remote server. It can be used to add SSL functionality to commonly used inetd daemons like POP2, POP3, and IMAP servers without any changes in the programs' code"

    That could even be a backdoor :(

  • (cs) in reply to shadowman
    shadowman:
    Kensey:
    When dealing with basic system commands as root, typing, say, "/bin/rm" rather than "rm" is a good habit to get into -- it reduces the chance that somebody compromises your box by getting you to run a Trojan-horse rm from a different location in your PATH than you think. root should also have a minimal PATH and it should be arranged sensibly to further reduce the risk.

    If you really want paranoia, you can disable root entirely and set up sudo on a single otherwise-unprivileged account, so that you can force root-level rm (or whatever) to run from /bin/rm or not at all regardless of what the value of PATH is.

    Unless of course, there's a trojan-horse rm that simply replaced /bin/rm.

    Well, if you've already got root (necessary to not-so-simply-as-you-suggest replace /bin/rm) then you hardly need go installing trojans and hoping for someone to accidentally trigger one by a bad PATH setting, eh?

  • Groxx (unregistered)

    My parents have an ActionTec... It's a major POS.

  • (cs) in reply to DaveK
    DaveK:
    In the words of Nelson Muntz, "FAIL!".

    He wasn't talking about Police Chief Wiggam's son in wedlock, duh.

    According to the script of an unreleased episode that's so secret not even its author is aware of it, Wiggum will pay dearly for interfering with one of Montgomery Burns' evil plots. As he is lying on the ground, breathing his last breaths, he turns to Muntz and says "Nelson, I am your father."

    To which Muntz will reply "HA HA."

    Sheesh, you really have to spell it out for some people.

  • Jason (unregistered) in reply to Kensey

    It also means that you don't get the versions of these commands built into the shell - sometimes a good thing.

  • (cs) in reply to rm -rf WTF
    rm -rf WTF:
    I dunno what's going on here with the routing, but TRWTF is that even though PATH clearly lists "/bin" they still call "rm" as "/bin/rm" even though every *nix system ever knows what you mean if you just say "rm".
    Actually, that's not necessarily true. Sometimes people alias rm to rm -i. the last thing you want in a start-up script (or any background script) is a prompt asking you if you really want to delete that file. Unsing /bin/rm makes sure the real command is used.
  • diaphanein (unregistered) in reply to Alexis de Torquemada
    Alexis de Torquemada:
    DaveK:
    In the words of Nelson Muntz, "FAIL!".

    He wasn't talking about Police Chief Wiggam's son in wedlock, duh.

    According to the script of an unreleased episode that's so secret not even its author is aware of it, Wiggum will pay dearly for interfering with one of Montgomery Burns' evil plots. As he is lying on the ground, breathing his last breaths, he turns to Muntz and says "Nelson, I am your father."

    To which Muntz will reply "HA HA."

    Sheesh, you really have to spell it out for some people.

    Or, just admit that you failed. Either one.

  • delenit (unregistered) in reply to Alexis de Torquemada
    Alexis de Torquemada:
    DaveK:
    In the words of Nelson Muntz, "FAIL!".

    He wasn't talking about Police Chief Wiggam's son in wedlock, duh.

    According to the script of an unreleased episode that's so secret not even its author is aware of it, Wiggum will pay dearly for interfering with one of Montgomery Burns' evil plots. As he is lying on the ground, breathing his last breaths, he turns to Muntz and says "Nelson, I am your father."

    To which Muntz will reply "HA HA."

    Sheesh, you really have to spell it out for some people.

    Is that the one where Burns is zapping Wiggum with electricity from his finger tips?

  • Jason (unregistered) in reply to Kensey
    Kensey:
    Brompot:
    True, but after you explicitly set the PATH variable that should not be an issue. You set EITHER the PATH variable OR you use full paths.

    When dealing with basic system commands as root, typing, say, "/bin/rm" rather than "rm" is a good habit to get into -- it reduces the chance that somebody compromises your box by getting you to run a Trojan-horse rm from a different location in your PATH than you think. root should also have a minimal PATH and it should be arranged sensibly to further reduce the risk.

    If you really want paranoia, you can disable root entirely and set up sudo on a single otherwise-unprivileged account, so that you can force root-level rm (or whatever) to run from /bin/rm or not at all regardless of what the value of PATH is.

    It also means that you can avoid the versions of the scripts that are built into the shell. This is usually a good thing for portability when you consider that the version of "sh" on the target platform is usually different from the one on your local machine.

    Solaris sh is different from Linux sh is different from HP/UX sh is different from BSD sh.

  • Dan (unregistered) in reply to DaveK
    DaveK:
    No, to "trail an error" is to give people a teaser or sneak preview of an upcoming error, in order to generate a buzz of anticipation amongst the error's potential audience. Some errors are anticipated long in advance, with excited fans camping on the pavement outside computer stores waiting for the launch day celebrations of the faulty code.

    The thing you're describing, where one failure leads you to another and from there to another until you're reeling and staggering, blundering from one error to another like a human pinball, only concussed, with each one hitting you with the force of a stepped-on lawnrake right in the face: that's called "trail OF error".

    And you thought it could only crash your desktop! Coming soon to a mobile phone near you... Windows, the abomination!

  • (cs) in reply to Alnitak
    Alnitak:
    Sorry, but what's the big deal?

    This is just the router startup script, and is pretty much what you'd expect for an embedded device, particularly one where the main stuff is in flash and you need to store temporary data in a ram disk.

    Nor is there anything here that would reduce or otherwise throttle the user's bandwidth.

    QFT.

  • smilr (unregistered) in reply to Jan
    Jan:
    Nobody seems to have picked up on one thing - why does a DSL router run stunnel???

    http://stunnel.mirt.net/ "The stunnel program is designed to work as an SSL encryption wrapper between remote client and local (inetd-startable) or remote server. It can be used to add SSL functionality to commonly used inetd daemons like POP2, POP3, and IMAP servers without any changes in the programs' code"

    That could even be a backdoor :(

    The only thing I can think of that may require ssl would be an outward facing web interface. Many routers I've seen have the option to allow connections to their web-configuratoin interface from outside the local network, through an https session on a different port (8080 vs 80 seems to be common). /shrug

  • Harold (unregistered)

    Lol, what is a "FOXME"?

  • Sigivald (unregistered) in reply to obediah
    obediah:
    Is this where I can bitch about linux distros creating their own library-fueled rc abomination?

    /etc/rc and /etc/rc.local

    Hey, that was easy. Thanks, plain old-fashioned BSD!

    I've run linux as a server for a very long time, and think it's fine, but this "be everything to everyone and also blend mixed drinks" thing has really gone too far.

  • Sigivald (unregistered) in reply to Sigivald

    I guess BBCode is too incredibly f*!@$^ retarded to figure out that "Quote" should match "quote".

    Why are we not using HTML, exactly?

  • (cs) in reply to Brompot
    Brompot:
    You set EITHER the PATH variable OR you use full paths.
    OR you do BOTH.

    Is this and a sarcastic comment all that constitutes a wtf nowadays? Give me any sizeable Linux distro and I'll keep the site going for a year.

  • (cs) in reply to Sigivald
    Sigivald:
    I guess BBCode is too incredibly f*!@$^ retarded to figure out that "Quote" should match "quote".
    1. See the "QUOTE" button? Ever wonder what it does?
    1. See the "EDIT" button? Ever wonder what it does?
    Sigivald:
    Why are we not using HTML, exactly?
    Because of people like you. If you can't operate a limited set of instructions and a sufficiently large toolset, then how on earth would you manage HTML?
  • Me (unregistered) in reply to rm -rf WTF
    rm -rf WTF:
    I dunno what's going on here with the routing, but TRWTF is that even though PATH clearly lists "/bin" they still call "rm" as "/bin/rm" even though every *nix system ever knows what you mean if you just say "rm".

    Unless you have it aliased, say to rm -i. In this case, /bin/rm overrides the use of the alias since it's a full path name to an executable.

  • (cs) in reply to Code Dependent
    Mark:
    From Mark - All spelling and grammer checking is crowdsourced - Thanks! Fixed.

    Ironically you misspelled grammar.

  • John (unregistered)

    Anyone mind spelling out the WTF for those who don't know Linux and not much about networking?

  • The Dark Messenger (unregistered)

    When I worked for a rural ISP in the days of dial-up we only sold modems with very basic functionality ($100). 90% of connection problems people had were related to brand name modems (usually around $500). For example having run through my full list of diagnostic tests over the phone I got the user to bring their computer into the office but I could not reproduce the problem. So it was time for a site visit, when I dialed in sure enough the problem was exactly as the user described, it would take about 90 seconds to connect, then you would get about 30 seconds use before it would "hang" for 30 seconds, then 30 seconds use... I plugged in one of our modems and did not have the same problem. The user manual offered no suggestions, but did give a list of AT commands (non standard of course) so after telnetting into the modem I convinced it to show me what exactly it was doing. It would start to negotiate a connection speed at 56k, then drop to the next speed and so on until it got a successful connection, if this was not 56k then it would start again at the top and work down again, this explained the first 60 seconds, then it really got "clever", every minute after the beginning of the first connection attempt it would try and negotiate a faster connection again starting at the top and working down, so this explained the rest of the first 90 seconds and why you could only get 30 seconds use per minute. After changing the modems settings so that it would only attempt to connect at the maximum speed the line would support it was time to update the standard list of diagnostic questions, the first question was now, what brand of modem do you have? I could not reproduce the problem in the office as we had a near perfect line to the exchange.

  • Jay (unregistered) in reply to DaveK
    DaveK:
    The thing you're describing, where one failure leads you to another and from there to another until you're reeling and staggering, blundering from one error to another like a human pinball, only concussed, with each one hitting you with the force of a stepped-on lawnrake right in the face: that's called "trail OF error".

    No, that's just public sector IT.

  • verisimilidude (unregistered) in reply to Alnitak
    Alnitak:
    Sorry, but what's the big deal?

    This is just the router startup script, and is pretty much what you'd expect for an embedded device, particularly one where the main stuff is in flash and you need to store temporary data in a ram disk.

    Nor is there anything here that would reduce or otherwise throttle the user's bandwidth.

    Actually I think the lines

    default value was 8192

    echo 2048 > /proc/sys/net/ipv4/route/max_size

    might be a problem, causing excessive fragmentation.

  • Tobias Brox (unregistered) in reply to Chiper
    Chiper:
    [Miquels van Smoorenburg's comment] deserves a blue, I think.

    Even though the comment isn't particularly funny, I totally agree with that, here is an innocent persons name and reputation dragged down in the dirt ...

    The alternative would be to anonymize the top comments, but I think that would be too late now.

  • methinks (unregistered) in reply to iMalc
    iMalc:
    tulcod:
    TRWTF is the fact that I saw a .nl domain name at the top of the file, surfed there, got redirected to xs4all.nl, and realized, i have that very same router :(
    In the words of Police Chief Wiggam's son from the Simpsons: Haa Haa!

    Sorry, I have to nitpick a little here...

    Chief WiggUm's son is called Ralph (a very simple minded child): [image]

    The guy with the notorious "haw-haw!" laughter OTOH is much less simple and much more mischievous and is called Nelson Muntz (son of Mrs. and Mr. Muntz -d'oh!) [image]

  • David (unregistered) in reply to Alexis de Torquemada
    Alexis de Torquemada:

    According to the script of an unreleased episode that's so secret not even its author is aware of it, Wiggum will pay dearly for interfering with one of Montgomery Burns' evil plots. As he is lying on the ground, breathing his last breaths, he turns to Muntz and says "Nelson, I am your father."

    To which Muntz will reply "HA HA."

    Sheesh, you really have to spell it out for some people.

    When I consider the poor quality of the scripts and seemingly random plots in the latest seasons of the Simpsons, I almost believe you.

  • Wedge (unregistered) in reply to rm -rf WTF
    rm -rf WTF:
    I dunno what's going on here with the routing, but TRWTF is that even though PATH clearly lists "/bin" they still call "rm" as "/bin/rm" even though every *nix system ever knows what you mean if you just say "rm".

    It's actually good to use "/bin/rm" in scripts to call rm rather than just "rm". Often times the current working directory will be included in the search path, so your script can be transformed into a root execution vector if you're not careful about qualifying the paths on your tools.

  • David (unregistered) in reply to Harold
    Harold:
    Lol, what is a "FOXME"?

    Like a FIXME, but impossibly hard to fix, thus the programmer is "foxed".

    You know like

    FOXME: make this sort run in O(1) time.

  • MG (unregistered)

    That's the /etc/init.d/rcS script from an ActionTec M1000.

    My DSL router appears to perform just fine, however.

  • DSL Modem Manufacturer #f00fc787 (unregistered)

    Isn't TRWTF that the user didn't update the firmware?

  • MG (unregistered) in reply to verisimilidude
    verisimilidude:

    Actually I think the lines

    default value was 8192

    echo 2048 > /proc/sys/net/ipv4/route/max_size

    might be a problem, causing excessive fragmentation.

    Care to explain how altering the route cache size causes excessive fragmentation?

  • fdizzle (unregistered)
    A. Coward:
    LOL, have a look at http://miquels.www.cistron.nl/nonsense/ the maintainers homepage....

    LOL clearly a debian user ;)

    /flamemelinuxfanboys

  • (cs)

    FOXME: CLEAN UP COMMENTS BEFORE POSTING

  • Jimbo (unregistered) in reply to David
    David:
    Harold:
    Lol, what is a "FOXME"?

    Like a FIXME, but impossibly hard to fix, thus the programmer is "foxed".

    You know like

    FOXME: make this sort run in O(1) time.

    Wear the FoxHat....

  • Jimmy (unregistered) in reply to Jan
    Jan:
    Nobody seems to have picked up on one thing - why does a DSL router run stunnel???

    Most routers have a management interface. It's probably a way of enabling the local webserver to accept HTTPS connections, probably the embedded webserver used doesn't have a mod_ssl available.

  • Jimmy (unregistered) in reply to David
    Harold:
    Lol, what is a "FOXME"?

    It means the programmer wants the reader to transform her into a beautiful woman, a "Fox".

    Presumably the programmer that wrote this comment doesn't think that she's very attractive, and wants something done about it.

  • Johan (unregistered) in reply to rm -rf WTF

    That's a security feature. ;-) It really is.

    It prevents others from changing the path and linking to another executable.

    Mostly it is linked to "rm" though. ;-) Example:

    Path = "/bin" Command in script is "ls important_file.txt" So, it will execute "/bin/ls important_file.txt"

    If an attacker does "ln -s /bin/rm /tmp/ls" And can change the path in the script to "/tmp" Then the script will actually execute "/bin/rm important_file.txt"

    Offcourse you need to be able the change the path...

  • Mike (unregistered)

    #THIS COMMENT IS A PIECE OF CRAP

  • rick (unregistered) in reply to IByte
    CAPTCHA: vulputate. I'm not sure I want to know what that means...

    To remove a fox from a body. Possibly a furry thing.

  • Hmmmm (unregistered)

    Steven!

  • SpamBot (unregistered) in reply to Chiper
    Chiper:
    Miquel van Smoorenburg <[email protected]>:
    I most certainly did not write this script.

    Looked like they took a sample script that comes with sysvinit, deleted everything but the version number and my name, and then put their own code in.

    Nice ... :/

    Mike.

    This deserves a blue, I think.

    seconded

  • IByte (unregistered) in reply to Alexis de Torquemada
    Alexis de Torquemada:
    He wasn't talking about Police Chief Wiggam's son in wedlock, duh.

    According to the script of an unreleased episode that's so secret not even its author is aware of it, [...]

    I wasn't aware of the existence of apocryphal Simpsons episodes. But then again, I guess that's the point.

  • M.Talon (unregistered) in reply to SpamBot

    Thirded. Saw that email addy and thought "wow, TDWTF didn't even bother to censor it". Then someone said it wasn't Mike's code, then Mike says it isn't his code.

    Can we get that clarification blue'd so people know?

  • Sanity (unregistered) in reply to d3matt

    Alright, this is getting a bit shameful...

    d3matt:
    rm -rf WTF:
    I dunno what's going on here with the routing, but TRWTF is that even though PATH clearly lists "/bin" they still call "rm" as "/bin/rm" even though every *nix system ever knows what you mean if you just say "rm".
    Not sure if it's common in every linux environment, but if you rsh then run a script (i.e. rsh myhost /path/to/script), often times the path isn't fully set so any command that doesn't have the full path will fail. There could be a similar issue with this "init" script
    First, WTF does "fully set" mean? How could that variable be "half-set"?

    Either the PATH is one value, or it's another. What you're probably thinking of is a case where some of the user's rc scripts (~/.bashrc, ~/.profile, etc) haven't been run.

    I'm guessing that ssh (seriously, who uses rsh anymore? Fail.) will execute at least one of those rc files, so you could always set the path correctly. The added benefit is that if you get the path set, you no longer have to care where the file is on that machine.

    Now, what no one mentioned is that it might be an issue with security -- for example, a setuid script probably doesn't want to trust ANYTHING from its environment. But hopefully, the initial boot script isn't setuid.

    Even if it was, the recommended precaution is to override PATH. Since this script set PATH clearly, there's really no reason to assume it might not be set. Even if you ran it over ssh, rsh, sudo, whatever, it's still going to set and preserve its own path.

    jeremypnet:
    Actually, that's not necessarily true. Sometimes people alias rm to rm -i. the last thing you want in a start-up script (or any background script) is a prompt asking you if you really want to delete that file. Unsing /bin/rm makes sure the real command is used.
    That would be a fair argument -- if it were run in the same shell as that alias. That seems unlikely. On my own Ubuntu system, there's a ~/.bashrc, run by Bash for non-login shells, and ~/.profile, run by Bash (and other sh-like shells) for login shells. By default, the first line of .bashrc causes the entire file to be skipped unless it's an interactive shell -- you would put aliases after that line.

    In other words, unless someone ran 'source' on that script, it's not running in an interactive shell. And unlike environment variables, aliases don't carry over to child shells. That's easy enough to test -- setup an alias, then run 'bash' to spawn a subshell and see if your alias is still there.

    Since I don't see any alias commands in the script, and since PATH is explicitly set, it's actually pretty safe to assume that rm is where it's supposed to be.

    It's not a huge WTF, as /bin is really where it belongs, but you never know. Where it would be a (slightly) bigger aggravation would be things like the classic #!/usr/bin/perl -- the Ruby people seem to have taken to "#!/usr/bin/env ruby", which I think is a lot cleaner. I'm probably not going to replace 'env', but it is nice to compile different versions of Ruby, put them under different paths, and choose which to use by tweaking environment variables.

  • JL (unregistered) in reply to rick
    rick:
    CAPTCHA: vulputate. I'm not sure I want to know what that means...

    To remove a fox from a body. Possibly a furry thing.

    Obviously, it mean FOXME.

  • (cs) in reply to Brompot
    Brompot:
    True, but after you explicitly set the PATH variable that should not be an issue. You set EITHER the PATH variable OR you use full paths.

    Exactly, obviously a case of the right hand not knowing what the left hand is doing. A true indicator of a WTF company. A good dev shop would have some kind of standard established so that everybody did it the same way.

  • (cs) in reply to Alexis de Torquemada
    Alexis de Torquemada:
    DaveK:
    In the words of Nelson Muntz, "FAIL!".

    He wasn't talking about Police Chief Wiggam's son in wedlock, duh.

    According to the script of an unreleased episode that's so secret not even its author is aware of it, Wiggum will pay dearly for interfering with one of Montgomery Burns' evil plots. As he is lying on the ground, breathing his last breaths, he turns to Muntz and says "Nelson, I am your father."

    To which Muntz will reply "HA HA."

    Sheesh, you really have to spell it out for some people.

    Nice try. But Family Guy already did it!

    ker-stamp /EXCUSE DENIED/

  • my wtf (unregistered) in reply to rm -rf WTF

    I use /bin/rm because on some of the systems I use, rm is aliased to rm -i.

Leave a comment on “#WHO WROTE THIS JUNK”

Log In or post as a guest

Replying to comment #:

« Return to Article