Re: [RFC] File flags handling - proposal for API.

Alan Cox (alan@lxorguk.ukuu.org.uk)
Sun, 27 Jun 1999 16:27:37 +0100 (BST)


> > fp = open(<directory>, O_RDONLY)
> >
> > opens a default-file in <directory> instead of <directory> itself, then we
> > have (at least compared to 2.0) a rather subtile change which may implies
> > some severe security problems.
>
> But the thing is, that we want to disallow opening the directory that way
> _anyway_. It's going to happen: if you want to open the directory, you
> will have to use the O_DIRECTORY flag. The current libraries do that
> already for opendir().

That doesn't, solve the inverse problem of all the tools that use open/read
blindly.

You change fundamental things like the behaviour of "more *" when people want
to read the files in a directory known the directories will just give
"is a directory" messages. Now they will give files from directories below.

Alan

-
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/