Reported by Dan Gohman <sunfish@mozilla.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00000.html>.
* lib/openat.c (rpl_openat): When testing whether flags contains O_RDWR,
ignore the bits that are also set in O_RDONLY.
+2020-03-07 Bruno Haible <bruno@clisp.org>
+
+ openat: Fix theoretically possible issue on GNU/Hurd.
+ Reported by Dan Gohman <sunfish@mozilla.com> in
+ <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00000.html>.
+ * lib/openat.c (rpl_openat): When testing whether flags contains O_RDWR,
+ ignore the bits that are also set in O_RDONLY.
+
2020-02-24 Bruno Haible <bruno@clisp.org>
getloadavg: Don't use /usr/local when cross-compiling on AIX.
directories,
- if O_WRONLY or O_RDWR is specified, open() must fail because the
file does not contain a '.' directory. */
- if (flags & (O_CREAT | O_WRONLY | O_RDWR))
+ if (flags & (O_CREAT | O_WRONLY | (O_RDWR & ~O_RDONLY)))
{
size_t len = strlen (filename);
if (len > 0 && filename[len - 1] == '/')