[Bug 240452] open(2) specifies EISDIR with existing directory for O_CREAT without O_DIRECTORY

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Sep 9 17:10:34 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240452

            Bug ID: 240452
           Summary: open(2) specifies EISDIR with existing directory for
                    O_CREAT without O_DIRECTORY
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: standards
          Assignee: standards at FreeBSD.org
          Reporter: emaste at freebsd.org

>From sortix's POSIX test suite we return success for

  open(tmpdir, O_RDONLY | O_CREAT, 0777)

while we should fail with EISDIR - POSIX now says
(https://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html):

[EISDIR]
    The named file is a directory and oflag includes O_WRONLY or O_RDWR, or
includes O_CREAT without O_DIRECTORY.

References:
https://sortix.org/os-test/
https://sortix.org/os-test/io/open-tmpdir-rdonly-creat.c
https://twitter.com/sortiecat/status/1171092062671908866

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-standards mailing list