Repository navigation
Missing O_NOFOLLOW #57
Description
Activity
- added 3 commits that reference this issue
on May 1, 2016 - added a commit that references this issue
on Feb 23, 2018 This bug appears to have been fixed, and ought to be closed.
Indeed, this was resolved in c7d88b3.
Perhaps I misunderstood the scope of this ticket. The issue (as far as I understood it) was the inability specify the
O_NOFOLLOWflag via the API, and that commit does add anofollowfield toOpenFileFlags. Is there a remaining issue that should warrant re-opening this ticket?Sorry if I'm being dense, but how does that let a directory stream be opened with O_NOFOLLOW? openDirStream still takes only a FilePath ..
openDirStreamusesopendir, which is not a syscall, but a C library function. It doesn't allow to set flags.Instead you would use
opento get a file descriptor, followed byfdopendirto get the DIR stream. I don't know if we have a function forfdopendir, you might have to write it yourself.Apologies for the noise, I confused this with my other issue for openDirStream O_NOFOLLOW support.
This is really annoying. I don't even understand why this library attempts to pre-select which flags I can pass in or not. That's not how a low-level library should be designed.
Since this library is about POSIX stuff, you should simply allow all POSIX flags, see http://www.unix.com/man-page/posix/3p/open/