[lkml]   [1999]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Why is chmod(2)?
Kristian Koehntopp wrote:
> b. Is it possible?

Yes if you define an `O_NONE' flag -- i.e. as opposed to O_RDONLY etc.

All the problems with side effects due to open and lack of permissions
are avoided by that: O_NONE means "return me a cookie, don't do anything

The different between stat() and lstat() is also covered nicely by
`O_NOFOLLOW', which we already have.

> a. Is this desireable?

For programs that call stat() on a lot of things, the added
overhead of open/fstat/close is probably significant.

For the rarer things like fchflags() which might arrive, perhaps O_NONE
this is a good idea. It is certainly simpler than the proposals to add

And as you point out, it's possible to improve security this way.

I recommend coding a patch to find out if O_NONE is really as easy as it

-- Jamie

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:54    [W:0.049 / U:18.152 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site