Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^3: magic-diamond <> behavior -- WHAT?!

by JavaFan (Canon)
on Oct 27, 2009 at 22:39 UTC ( [id://803537]=note: print w/replies, xml ) Need Help??


in reply to Re^2: magic-diamond <> behavior -- WHAT?!
in thread magic-diamond <> behavior -- WHAT?!

Wait. You want to protect against a root who runs some-program-he-doesn't-really-know * in a directory with world write access, without looking at the content of the directory?
Isn't it easier to fix scripts that rely on magic open after they stop working, then to fix scripts that work perfectly, except that they could ruin your system.
I'd say the person with root access is a way bigger problem to your system than magical open.

Replies are listed 'Best First'.
Re^4: magic-diamond <> behavior -- WHAT?!
by zwon (Abbot) on Oct 28, 2009 at 08:57 UTC

    What do you mean by "really know"? Do you saying that before running some program I should review the sources? Are you really always do that? And root access is not a requirement to fall into that trap, ordinary users, who don't even know what Perl is, also can run these scripts.

      What do you mean by "really know"?
      Heh, you introducted this root, not me:
      Some of these scripts are run by root, and he may don't even know that they written in Perl, I don't think he checking that there are no files with | or < in their names.

      And root access is not a requirement to fall into that trap, ordinary users, who don't even know what Perl is, also can run these scripts.
      Running whatever * while not knowing what * expands to or what whatever does is dangerous regardless of the language whatever is written in. Disabling magic open in Perl isn't going to fix the potential problems with this technique.

      It's like saying "let's turn all Toyotas into bumper cars, as there are people crossing the road with their eyes closed". That doesn't make crossing the road with your eyes closed safe - you still get run down by Fords and other cars.

        Running whatever * while not knowing what * expands to

        I always felt safe running grep something *, can you enlighten me how it can be dangerous?

        or what whatever does

        in this case question is how whatever is implemented

        It's like saying "let's turn all Toyotas into bumper cars

        It's like saying let's equip every Toyota with safety belts.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://803537]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-19 19:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found