lkml.org 
[lkml]   [1999]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: fyi, 2.0.36 read() EBADF bug (it was O_WRONLY)
Date
From
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/

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