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
https://reviews.freebsd.org/D21634
A commit references this bug: Author: kib Date: Tue Sep 17 18:32:19 UTC 2019 New revision: 352455 URL: https://svnweb.freebsd.org/changeset/base/352455 Log: Return EISDIR when directory is opened with O_CREAT without O_DIRECTORY. Reviewed by: bcr (man page), emaste (previous version) PR: 240452 Sponsored by: The FreeBSD Foundation MFC after: 1 week DIfferential revision: https://reviews.freebsd.org/D21634 Changes: head/lib/libc/sys/open.2 head/sys/kern/vfs_vnops.c
A commit references this bug: Author: kib Date: Tue Sep 24 06:18:49 UTC 2019 New revision: 352643 URL: https://svnweb.freebsd.org/changeset/base/352643 Log: MFC r352455: Return EISDIR when directory is opened with O_CREAT without O_DIRECTORY. PR: 240452 Changes: _U stable/12/ stable/12/lib/libc/sys/open.2 stable/12/sys/kern/vfs_vnops.c
A commit references this bug: Author: kib Date: Tue Sep 24 06:21:49 UTC 2019 New revision: 352645 URL: https://svnweb.freebsd.org/changeset/base/352645 Log: MFC r352455: Return EISDIR when directory is opened with O_CREAT without O_DIRECTORY. PR: 240452 Changes: _U stable/11/ stable/11/lib/libc/sys/open.2 stable/11/sys/kern/vfs_vnops.c