commit | 97690a28ea4f2d845027b52d84553b521a3174e7 | [log] [tgz] |
---|---|---|
author | Nick Kralevich <nnk@google.com> | Mon Jun 16 22:55:25 2014 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Mon Jun 16 22:12:26 2014 +0000 |
tree | b3f4abaaf9322897703110ba0222b07f0ff7c464 | |
parent | b3afd6c7f47c0e734eab2ec707b0194c4a62ffc9 [diff] | |
parent | 30a86ebc7a0f5a2e0fc698f432ee626cd96525b8 [diff] |
Merge "fs_mkdirs: use O_NOFOLLOW and O_CLOEXEC"
diff --git a/libcutils/fs.c b/libcutils/fs.c index 286a8eb..45c7add 100644 --- a/libcutils/fs.c +++ b/libcutils/fs.c
@@ -212,7 +212,7 @@ /* Yay, segment is ready for us to step into */ int next_fd; - if ((next_fd = openat(fd, segment, 0)) == -1) { + if ((next_fd = openat(fd, segment, O_NOFOLLOW | O_CLOEXEC)) == -1) { ALOGE("Failed to openat(%s): %s", buf, strerror(errno)); res = -errno; goto done_close;