diff options
Diffstat (limited to 'lib/openat.c')
-rw-r--r-- | lib/openat.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/openat.c b/lib/openat.c index 6deadfdb58..25ffd770e0 100644 --- a/lib/openat.c +++ b/lib/openat.c @@ -82,8 +82,9 @@ rpl_openat (int dfd, char const *filename, int flags, ...) } # if OPEN_TRAILING_SLASH_BUG - /* If the filename ends in a slash and one of O_CREAT, O_WRONLY, O_RDWR - is specified, then fail. + /* Fail if one of O_CREAT, O_WRONLY, O_RDWR is specified and the filename + ends in a slash, as POSIX says such a filename must name a directory + <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13>. If the named file already exists as a directory, then - if O_CREAT is specified, open() must fail because of the semantics of O_CREAT, |