Skip to content

Missing O_NOFOLLOW #57

Description

@hasufell

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/

O_NOFOLLOW If path names a symbolic link, fail and set errno to [ELOOP].

Activity

  1. added 3 commits that reference this issue on May 1, 2016
    21bb65c
    6ad9639
    2c812bf
  2. joeyh commented on Jun 24, 2019

    @joeyh

    This bug appears to have been fixed, and ought to be closed.

  3. RyanGlScott commented on Jun 24, 2019

    @RyanGlScott
    Member

    Indeed, this was resolved in c7d88b3.

  4. joeyh commented on Jun 24, 2019

    @joeyh
  5. RyanGlScott commented on Jun 24, 2019

    @RyanGlScott
    Member

    Perhaps I misunderstood the scope of this ticket. The issue (as far as I understood it) was the inability specify the O_NOFOLLOW flag via the API, and that commit does add a nofollow field to OpenFileFlags. Is there a remaining issue that should warrant re-opening this ticket?

  6. hasufell commented on Jun 24, 2019

    @hasufell
    MemberAuthor

    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 ..

    openDirStream uses opendir, which is not a syscall, but a C library function. It doesn't allow to set flags.

    Instead you would use open to get a file descriptor, followed by fdopendir to get the DIR stream. I don't know if we have a function for fdopendir, you might have to write it yourself.

  7. joeyh commented on Jun 24, 2019

    @joeyh

    Apologies for the noise, I confused this with my other issue for openDirStream O_NOFOLLOW support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions