summaryrefslogtreecommitdiffstats
path: root/install.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2017-07-11 00:13:33 +0200
committerTianjie Xu <xunchang@google.com>2017-07-19 21:17:41 +0200
commitde6735e80cc65be50381388640d94f1b1d0f20fa (patch)
treebdcda7cd5a4e2baa1f45c66f6a1698df47119175 /install.cpp
parentMerge "Fix the missing char when showing recovery logs." (diff)
downloadandroid_bootable_recovery-de6735e80cc65be50381388640d94f1b1d0f20fa.tar
android_bootable_recovery-de6735e80cc65be50381388640d94f1b1d0f20fa.tar.gz
android_bootable_recovery-de6735e80cc65be50381388640d94f1b1d0f20fa.tar.bz2
android_bootable_recovery-de6735e80cc65be50381388640d94f1b1d0f20fa.tar.lz
android_bootable_recovery-de6735e80cc65be50381388640d94f1b1d0f20fa.tar.xz
android_bootable_recovery-de6735e80cc65be50381388640d94f1b1d0f20fa.tar.zst
android_bootable_recovery-de6735e80cc65be50381388640d94f1b1d0f20fa.zip
Diffstat (limited to '')
-rw-r--r--install.cpp2
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;