summaryrefslogtreecommitdiff
path: root/io/openat64_2.c
diff options
context:
space:
mode:
Diffstat (limited to 'io/openat64_2.c')
-rw-r--r--io/openat64_2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/io/openat64_2.c b/io/openat64_2.c
index 96f04d285b..8548c3d557 100644
--- a/io/openat64_2.c
+++ b/io/openat64_2.c
@@ -22,8 +22,8 @@
int
__openat64_2 (int fd, const char *file, int oflag)
{
- if (oflag & O_CREAT)
- __fortify_fail ("invalid openat64 call: O_CREAT without mode");
+ if (__OPEN_NEEDS_MODE (oflag))
+ __fortify_fail ("invalid openat64 call: O_CREAT or O_TMPFILE without mode");
return __openat64 (fd, file, oflag);
}