Soo, what's the better invocation: open("foo", O_RDONLY|O_DIRECTORY) or just open("foo", O_DIRECTORY)? I mean, both appear to work, but I think one of them feels more correct, but what do you think?
-
-
Replying to @pid_eins
Didn't we have this discussion? :D I think this comes down to the kernel ignoring flags again. Like, when you pass O_CREAT | O_DIRECTORY instead of telling you that this does not work it will just ignore O_DIRECTORY. I've looked at this a while ago.
2 replies 0 retweets 1 like -
Technically, they currently look like they don't care about each other in the sense that no decision is based off of O_{WR,RDONLY} when O_DIRECTORY is passed. Which means it can't be changed without breaking userspace. So the answer is it doesn't matter.
1 reply 0 retweets 1 like
see may_open()'s check for MAY_WRITE in the S_IFDIR case
1:46 PM - 7 Jan 2019
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.