summaryrefslogtreecommitdiffstats
path: root/applypatch
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2012-06-27 00:01:03 +0200
committerDees_Troy <dees_troy@teamw.in>2013-01-07 19:51:23 +0100
commit5ae23322029179343466a154fa14c8a33ea9fe6b (patch)
tree78c5caab4c076717a947662ebc5ab6c66a12adb0 /applypatch
parentMerge "Improve handling of undecrypted encrypted /data" into jb-wip (diff)
downloadandroid_bootable_recovery-5ae23322029179343466a154fa14c8a33ea9fe6b.tar
android_bootable_recovery-5ae23322029179343466a154fa14c8a33ea9fe6b.tar.gz
android_bootable_recovery-5ae23322029179343466a154fa14c8a33ea9fe6b.tar.bz2
android_bootable_recovery-5ae23322029179343466a154fa14c8a33ea9fe6b.tar.lz
android_bootable_recovery-5ae23322029179343466a154fa14c8a33ea9fe6b.tar.xz
android_bootable_recovery-5ae23322029179343466a154fa14c8a33ea9fe6b.tar.zst
android_bootable_recovery-5ae23322029179343466a154fa14c8a33ea9fe6b.zip
Diffstat (limited to 'applypatch')
-rw-r--r--applypatch/applypatch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/applypatch/applypatch.c b/applypatch/applypatch.c
index 00004e9a8..488fd8c6f 100644
--- a/applypatch/applypatch.c
+++ b/applypatch/applypatch.c
@@ -324,7 +324,7 @@ static int LoadPartitionContents(const char* filename, FileContents* file) {
// Save the contents of the given FileContents object under the given
// filename. Return 0 on success.
int SaveFileContents(const char* filename, const FileContents* file) {
- int fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC);
+ int fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
if (fd < 0) {
printf("failed to open \"%s\" for write: %s\n",
filename, strerror(errno));
@@ -843,7 +843,7 @@ static int GenerateTarget(FileContents* source_file,
strcpy(outname, target_filename);
strcat(outname, ".patch");
- output = open(outname, O_WRONLY | O_CREAT | O_TRUNC);
+ output = open(outname, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
if (output < 0) {
printf("failed to open output file %s: %s\n",
outname, strerror(errno));