aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Damien Martin-Guillerez <dmarting@google.com>2015-03-26 09:04:23 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2015-03-26 09:29:48 +0000
commite20e54481ec7dcce07a86d009951e18906ff0330 (patch)
tree2c9c4a0fb7405309de02ab5ae7d7f4f9d25788ac /src
parentbad299402cf118a9e078e7ddb66c651c37cb800d (diff)
Enforce executable flags on embedded binaries
Depending on the setting of the machine, the executable flag might not be set. ZIP format does not conserve unix permissions and it is probably up to the umode set. Not relying on the system permission is more stable. Fixes #58 -- MOS_MIGRATED_REVID=89581859
Diffstat (limited to 'src')
-rw-r--r--src/main/cpp/blaze.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/cpp/blaze.cc b/src/main/cpp/blaze.cc
index d4339e5e9a..ff1ffca942 100644
--- a/src/main/cpp/blaze.cc
+++ b/src/main/cpp/blaze.cc
@@ -791,7 +791,7 @@ static void ActuallyExtractData(const string &argv0,
pdie(blaze_exit_code::INTERNAL_ERROR,
"couldn't create '%s'", path.c_str());
}
- int fd = open(path.c_str(), O_CREAT | O_WRONLY, archive_entry_perm(entry));
+ int fd = open(path.c_str(), O_CREAT | O_WRONLY, 0755);
if (fd < 0) {
die(blaze_exit_code::LOCAL_ENVIRONMENTAL_ERROR,
"\nFailed to open extraction file: %s", strerror(errno));