summaryrefslogtreecommitdiffstats
path: root/fs_mgr
diff options
context:
space:
mode:
authorSami Tolvanen <samitolvanen@google.com>2014-11-13 17:13:47 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-11-13 17:13:48 +0000
commit3e5319734c45e324871efed26d9feffe11146cc9 (patch)
tree9daf947af5308aa377aa425791d30cb527e42074 /fs_mgr
parent2028b97788ab3723d55270e02658e87e066ad262 (diff)
parentc95e9da39660f278ace4b14d688dc6818d1a38bf (diff)
downloadsystem_core-3e5319734c45e324871efed26d9feffe11146cc9.zip
system_core-3e5319734c45e324871efed26d9feffe11146cc9.tar.gz
system_core-3e5319734c45e324871efed26d9feffe11146cc9.tar.bz2
Merge "Do not mount devices with invalid verity metadata"
Diffstat (limited to 'fs_mgr')
-rw-r--r--fs_mgr/fs_mgr_verity.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs_mgr/fs_mgr_verity.c b/fs_mgr/fs_mgr_verity.c
index f02781c..51555a1 100644
--- a/fs_mgr/fs_mgr_verity.c
+++ b/fs_mgr/fs_mgr_verity.c
@@ -378,7 +378,7 @@ static int set_verified_property(char *name) {
int fs_mgr_setup_verity(struct fstab_rec *fstab) {
- int retval = -1;
+ int retval = FS_MGR_SETUP_VERITY_FAIL;
int fd = -1;
char *verity_blk_name = 0;
@@ -409,6 +409,8 @@ int fs_mgr_setup_verity(struct fstab_rec *fstab) {
goto out;
}
+ retval = FS_MGR_SETUP_VERITY_FAIL;
+
// get the device mapper fd
if ((fd = open("/dev/device-mapper", O_RDWR)) < 0) {
ERROR("Error opening device mapper (%s)", strerror(errno));