Re: open() syscall

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Mon, 28 Jun 1999 21:55:41 +0200


Arvind Sankar wrote:
> > What about an open() that is only used to grab a file handle?
> > One might not have read access on the file, but there are plenty
> > of functions that take a file descriptor.
> >
>
> All of them which make sense on a file to which you do not have access have
> a pathname equivalent. fstat() vs stat() etc.

Suppose you want to lstat() and stat() the same object... no way to do
it without a race condition.

And in recent discussions about chflags/lchflags/fchflags... so many new
syscalls. With Albert's suggestion, only one is required.

Though Albert's suggestion does introduce a rather unlikely
denial-of-service problem: you'd be able to prevent an unreadable
filesystem from being unmounted by opening its root directory.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/