[Glibc-bsd-commits] r6101 - trunk/glibc-ports-2.24/kfreebsd
aurel32 at alioth.debian.org
aurel32 at alioth.debian.org
Mon Aug 15 08:24:29 UTC 2016
Author: aurel32
Date: 2016-08-15 08:24:28 +0000 (Mon, 15 Aug 2016)
New Revision: 6101
Modified:
trunk/glibc-ports-2.24/kfreebsd/open.c
trunk/glibc-ports-2.24/kfreebsd/openat.c
Log:
Merge from upstream:
linux: open and openat ignore 'mode' with O_TMPFILE in flags
Both open and openat load their last argument 'mode' lazily, using
va_arg() only if O_CREAT is found in oflag. This is wrong, mode is also
necessary if O_TMPFILE is in oflag.
[note strictly necessary, but good to have if FreeBSD adds support for
O_TMPFILE]
Modified: trunk/glibc-ports-2.24/kfreebsd/open.c
===================================================================
--- trunk/glibc-ports-2.24/kfreebsd/open.c 2016-08-14 14:47:38 UTC (rev 6100)
+++ trunk/glibc-ports-2.24/kfreebsd/open.c 2016-08-15 08:24:28 UTC (rev 6101)
@@ -31,7 +31,7 @@
int mode = 0;
int fd;
- if (oflag & O_CREAT)
+ if (__OPEN_NEEDS_MODE (oflag))
{
va_list arg;
va_start (arg, oflag);
Modified: trunk/glibc-ports-2.24/kfreebsd/openat.c
===================================================================
--- trunk/glibc-ports-2.24/kfreebsd/openat.c 2016-08-14 14:47:38 UTC (rev 6100)
+++ trunk/glibc-ports-2.24/kfreebsd/openat.c 2016-08-15 08:24:28 UTC (rev 6101)
@@ -42,7 +42,7 @@
int mode = 0;
int result;
- if (oflag & O_CREAT)
+ if (__OPEN_NEEDS_MODE (oflag))
{
va_list arg;
va_start (arg, oflag);
More information about the Glibc-bsd-commits
mailing list