diff options
author | Tianjie Xu <xunchang@google.com> | 2017-07-20 01:00:19 +0200 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-07-20 01:00:19 +0200 |
commit | 94a8ea1797cf807458f94953fe721985bf1261f0 (patch) | |
tree | bdcda7cd5a4e2baa1f45c66f6a1698df47119175 /install.cpp | |
parent | Merge "Fix the missing char when showing recovery logs." (diff) | |
parent | Fix the android-cloexec-* warnings in bootable/recovery (diff) | |
download | android_bootable_recovery-94a8ea1797cf807458f94953fe721985bf1261f0.tar android_bootable_recovery-94a8ea1797cf807458f94953fe721985bf1261f0.tar.gz android_bootable_recovery-94a8ea1797cf807458f94953fe721985bf1261f0.tar.bz2 android_bootable_recovery-94a8ea1797cf807458f94953fe721985bf1261f0.tar.lz android_bootable_recovery-94a8ea1797cf807458f94953fe721985bf1261f0.tar.xz android_bootable_recovery-94a8ea1797cf807458f94953fe721985bf1261f0.tar.zst android_bootable_recovery-94a8ea1797cf807458f94953fe721985bf1261f0.zip |
Diffstat (limited to 'install.cpp')
-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; |