summaryrefslogtreecommitdiffstats
path: root/install.cpp
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-07-20 09:27:35 +0200
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-07-20 09:27:35 +0200
commit9030a47ab4ce9369eaeda08eeaad764fcebc8ce4 (patch)
tree38c38831f3a8bff345a92e1e8e85bfa57db480b7 /install.cpp
parentrelease-request-05263112-375a-4b1f-a657-a14bb2a5c5a3-for-git_oc-mr1-release-4185249 snap-temp-L63000000082739046 (diff)
parentMerge "Fix the android-cloexec-* warnings in bootable/recovery" am: 94a8ea1797 am: 6d8827e0d3 am: 96b5bb9601 (diff)
downloadandroid_bootable_recovery-9030a47ab4ce9369eaeda08eeaad764fcebc8ce4.tar
android_bootable_recovery-9030a47ab4ce9369eaeda08eeaad764fcebc8ce4.tar.gz
android_bootable_recovery-9030a47ab4ce9369eaeda08eeaad764fcebc8ce4.tar.bz2
android_bootable_recovery-9030a47ab4ce9369eaeda08eeaad764fcebc8ce4.tar.lz
android_bootable_recovery-9030a47ab4ce9369eaeda08eeaad764fcebc8ce4.tar.xz
android_bootable_recovery-9030a47ab4ce9369eaeda08eeaad764fcebc8ce4.tar.zst
android_bootable_recovery-9030a47ab4ce9369eaeda08eeaad764fcebc8ce4.zip
Diffstat (limited to 'install.cpp')
-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;