aboutsummaryrefslogtreecommitdiff
path: root/libc/bionic
diff options
context:
space:
mode:
authorGeorge Burgess IV <gbiv@google.com>2019-06-06 17:18:13 -0700
committerGeorge Burgess IV <gbiv@google.com>2019-06-13 23:26:02 -0700
commit2356c93d391c1948b3abb7602da3d97bd8b289f2 (patch)
treea490fc205ecbbd2f21b93f0102a806ccc1a075de /libc/bionic
parent77f99aaf58b944b23f2cfb38fce08a98feabe93f (diff)
fortify: add bit checking for open(at)?64 functions
This also adds _2-variants for these functions, for extra glorious checking Bug: 131861088 Test: mma Change-Id: I80475ff4bb220c0c47894e9532426f53412f176f
Diffstat (limited to 'libc/bionic')
-rw-r--r--libc/bionic/open.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libc/bionic/open.cpp b/libc/bionic/open.cpp
index 222e5d3f4..df5ab215b 100644
--- a/libc/bionic/open.cpp
+++ b/libc/bionic/open.cpp
@@ -70,6 +70,7 @@ int __open_2(const char* pathname, int flags) {
if (needs_mode(flags)) __fortify_fatal("open: called with O_CREAT/O_TMPFILE but no mode");
return __openat(AT_FDCWD, pathname, force_O_LARGEFILE(flags), 0);
}
+__strong_alias(__open64_2, __open_2);
int openat(int fd, const char *pathname, int flags, ...) {
mode_t mode = 0;
@@ -89,3 +90,4 @@ int __openat_2(int fd, const char* pathname, int flags) {
if (needs_mode(flags)) __fortify_fatal("open: called with O_CREAT/O_TMPFILE but no mode");
return __openat(fd, pathname, force_O_LARGEFILE(flags), 0);
}
+__strong_alias(__openat64_2, __openat_2);