in reply to Re: Dangerous diamonds!
in thread Dangerous diamonds!
I'm a little suprised people are still being suprised by the magic of the open call.
I'm not surprised by the open call. I'm surprised that Perl uses this way to open files with magic ARGV. Three argument open would have been a lot safer.
I'm very sure I'm not the only one who forgot that magic ARGV uses normal two-arg open internally. The number of exploitable scripts made by my customers and myself proves that most people are unaware of the security problems or chose to simply ignore them. I found 15 so far.
If you're worried, turn on taint.
Thanks. Even though I hate Perl's tainting mechanism, I'll use it here. It still cannot really fix the problem, since scripts will now die if they encounter an invalid file.
BTW, who runs oneliners as root? (i'd consider that a bug)
Everyone who needs a script to run as root runs scripts as root.
Users can't do everything root can, and sometimes you need to be root to do what you want to do.
Not everything can be done by a user, some things need to be done by root.
And some of those things are made by me, and those things made by me are written in Perl.
Perl is a powerful language that lets me do those things in simple one-liners, so I do do that with simple one-liners.
The one-liners run as root because they need to do things that only root can do.
The one-liners couldn't do what they need to do if they were not run as root.
And THAT would be a bug.
Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Dangerous diamonds!
by PodMaster (Abbot) on May 18, 2003 at 16:09 UTC | |
by bart (Canon) on May 19, 2003 at 21:24 UTC | |
by PodMaster (Abbot) on May 19, 2003 at 21:47 UTC | |
by bart (Canon) on May 20, 2003 at 07:50 UTC | |
by Juerd (Abbot) on May 18, 2003 at 16:12 UTC |