Re: Upstream first policy

From: Linus Torvalds
Date: Mon Mar 08 2010 - 14:00:30 EST




On Mon, 8 Mar 2010, Al Viro wrote:
> >
> > I really don't understand why some people are unable to admit this fact.
>
> Because you don't have to use that pathname to modify the bits returned
> by read() after open() on that pathname?

The thing is, I don't think it's an "either or".

Sure, there is content security. Nobody disputes that. The security
decision about how to open a file is about the contents of the file.

So I'm not suggesting we _replace_ content-based security with
pathname-based security. I'm just saying that pathnames actually do matter
for security, and that they are an independent issue.

> I'm not fond of selinux, to put it mildly, but "pathname-based" stuff simply
> doesn't match how the pathname resolution is defined on Unix...

Again, I'm not claiming that we should change how "open" works and has
always worked. I don't even understand why you have that crazy "either or"
mentality to begin with. Why?

It's not "either pathname or inode". I'm saying _both_ make sense.

In some situations, the name itself really is what is fundamentally
special about the file.

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