diff options
author | Tianjie Xu <xunchang@google.com> | 2017-07-20 01:14:51 +0200 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-07-20 01:14:51 +0200 |
commit | 3a3019199c64e5bea2e01e8ce8283a2ee36a624c (patch) | |
tree | 38c38831f3a8bff345a92e1e8e85bfa57db480b7 /install.cpp | |
parent | Merge "Remove the obsolete reference to /file_contexts." (diff) | |
parent | Merge "Fix the android-cloexec-* warnings in bootable/recovery" am: 94a8ea1797 am: 6d8827e0d3 (diff) | |
download | android_bootable_recovery-3a3019199c64e5bea2e01e8ce8283a2ee36a624c.tar android_bootable_recovery-3a3019199c64e5bea2e01e8ce8283a2ee36a624c.tar.gz android_bootable_recovery-3a3019199c64e5bea2e01e8ce8283a2ee36a624c.tar.bz2 android_bootable_recovery-3a3019199c64e5bea2e01e8ce8283a2ee36a624c.tar.lz android_bootable_recovery-3a3019199c64e5bea2e01e8ce8283a2ee36a624c.tar.xz android_bootable_recovery-3a3019199c64e5bea2e01e8ce8283a2ee36a624c.tar.zst android_bootable_recovery-3a3019199c64e5bea2e01e8ce8283a2ee36a624c.zip |
Diffstat (limited to '')
-rw-r--r-- | install.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/install.cpp b/install.cpp index 7ba8f0139..7fbf5c01f 100644 --- a/install.cpp +++ b/install.cpp @@ -265,7 +265,7 @@ int update_binary_command(const std::string& package, ZipArchiveHandle zip, } unlink(binary_path.c_str()); - int fd = creat(binary_path.c_str(), 0755); + int fd = open(binary_path.c_str(), O_CREAT | O_WRONLY | O_TRUNC | O_CLOEXEC, 0755); if (fd == -1) { PLOG(ERROR) << "Failed to create " << binary_path; return INSTALL_ERROR; |