Messages in this thread | | | Subject | Re: fyi, 2.0.36 read() EBADF bug (it was O_WRONLY) | Date | Sun, 12 Sep 1999 23:10:56 -0700 | From | Zack Weinberg <> |
| |
Clayton Weaver wrote: > Ok, Waugh's question clued me to the fact that once you open > a file descriptor write-only, you can't change it to readable > without closing it first, regardless of what you may do to the > filesystem inode with fchmod()/chmod(). > > So this is a unix bug rather than a linux bug?
I wouldn't describe it as a bug. It is a consequence of the general rule: the access privileges of a file descriptor are fixed at open time. Anything that happens to the inode after that is irrelevant. This is almost always the behavior you want. For when it isn't, see revoke(2) [which Linux doesn't have].
zw
- 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/
| |