[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in Filesystem of Obsd 2.9 ??
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: Bug in Filesystem of Obsd 2.9 ??
- From: Carsten Menke <bootsy52_(_at_)_gmx_(_dot_)_net>
- Date: Tue, 17 Jul 2001 15:21:10 +0200 (MEST)
recently when I was writing a little bit in Perl I remarked something
strange, as I was testing perl's -w option. I wanted to test if the if loop works
which is asking if a file is writeable or not. As it never claimed anything on
a write protected file I thought I had made an error in my Perl script.
But in fact, Perl hasn't cared about the non write of that file and simply
wrote to it.
I'm not able to write to this file as root, and the file has absolutley no
write permissions. As far as I understand perls writing mechanism of an
existing file works in that way, that the file in case of a (OPEN, ">file")is first
snipped to the first line and then the conents are inserted.
As this is not a delete of the file, this is not a write access on the
directory, so removing all write permissions on the file should suffice, to block
it for programs and users (such as root) to write to that file.
Why is that not the case? Where is the bug? In Perl (likley not, as perl is
underlaying the Operating System) Or is it the filesystem of OpenBSD?
I'm using OpenBSD 2.9 stable on a i386
GMX - Die Kommunikationsplattform im Internet.
Machen Sie Ihr Hobby zu Geld bei unserem Partner 1&1!
Visit your host, monkey.org