aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@google.com>2018-09-10 17:23:27 -0700
committerBowgo Tsai <bowgotsai@google.com>2018-12-05 09:51:02 +0800
commit54d268e73f509c4c134317406850fd7ad938facd (patch)
treee30974e3dd5d640080b0b1463d4a3ee81b870b3e
parentbc2be82a7f52610f4462b0f0fc161628301c6723 (diff)
downloadandroid_bootable_recovery-54d268e73f509c4c134317406850fd7ad938facd.tar.gz
android_bootable_recovery-54d268e73f509c4c134317406850fd7ad938facd.tar.bz2
android_bootable_recovery-54d268e73f509c4c134317406850fd7ad938facd.zip
uncrypt: write permission for f2fs_pin_file
We need a write permission to set a flag in the file. Bug: None Test: pre-submit Change-Id: I4896ecbe0fc04374e01d006b1c8acdb932e5d16d Merged-In: I4896ecbe0fc04374e01d006b1c8acdb932e5d16d Signed-off-by: Jaegeuk Kim <jaegeuk@google.com> (cherry picked from commit 051b9d87e2bf1550ab6495493b9a2cfab2aa54f1)
-rw-r--r--uncrypt/uncrypt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/uncrypt/uncrypt.cpp b/uncrypt/uncrypt.cpp
index 95f40c71..0ec226e2 100644
--- a/uncrypt/uncrypt.cpp
+++ b/uncrypt/uncrypt.cpp
@@ -300,7 +300,7 @@ static int produce_block_map(const char* path, const char* map_file, const char*
int head_block = 0;
int head = 0, tail = 0;
- android::base::unique_fd fd(open(path, O_RDONLY));
+ android::base::unique_fd fd(open(path, O_RDWR));
if (fd == -1) {
PLOG(ERROR) << "failed to open " << path << " for reading";
return kUncryptFileOpenError;