From 87a5b1f99295e130de7fc2b0463e0c30cc779c07 Mon Sep 17 00:00:00 2001 From: Bowgo Tsai Date: Mon, 8 May 2017 17:15:20 +0800 Subject: [PATCH] fs_mgr_verity: fix androidboot.veritymode=enforcing doesn't work Should set verity mode to VERITY_MODE_DEFAULT when androidboot.veritymode=enforcing. Bug: 38103331 Test: `adb shell getprop partition.system.verified` returns 2 when veritymode=enforcing Test: `adb shell getprop partition.vendor.verified` returns 2 when veritymode=enforcing (cherry picked from commit 77cbfd6341a7a500fdb8e2f3cc4a4f721254f10e) Merged-Id: I2f34eb6509f91989ce726e540cf2c0d353347ede Change-Id: I2f34eb6509f91989ce726e540cf2c0d353347ede --- fs_mgr/fs_mgr_verity.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs_mgr/fs_mgr_verity.cpp b/fs_mgr/fs_mgr_verity.cpp index 0bf173bd8..5fa10bc6e 100644 --- a/fs_mgr/fs_mgr_verity.cpp +++ b/fs_mgr/fs_mgr_verity.cpp @@ -663,7 +663,7 @@ int load_verity_state(struct fstab_rec* fstab, int* mode) { /* use the kernel parameter if set */ std::string veritymode; if (fs_mgr_get_boot_config("veritymode", &veritymode)) { - if (veritymode.compare("enforcing")) { + if (veritymode == "enforcing") { *mode = VERITY_MODE_DEFAULT; } return 0;