summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2022-03-01 12:49:05 -0600
committerCommit Bot <commit-bot@chromium.org>2022-03-01 21:38:01 +0000
commitb78cbbfd27470abdd588f6d17670a30dbe63db01 (patch)
tree0eabcbfc3f861b94bd000864c54d0ccc43234dbc
parent9ea42018d44c9f3d9c0f857a280fc55332aa8db5 (diff)
downloadchrome-ec-b78cbbfd27470abdd588f6d17670a30dbe63db01.tar.gz
ccd_config: allow the option to restrict ccd in prepvt images
By default ccd open can be sent from the console in normal mode with prepvt images. The open capabilities are set to Always which should determine that open is allowed, but prepvt images completely ignore the ccd settings. This change modifies the CCD_OPEN_PREPVT behavior to honor the capabilities, so someone could restrict ccd open in prepvt images with the ccd capability settings. BUG=b:221260041 TEST=manual see bug Change-Id: I1c3fc4f5be27a08ea9071966cc01c4b9ff20dbe5 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3498700 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
-rw-r--r--common/ccd_config.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/common/ccd_config.c b/common/ccd_config.c
index 7d430cb797..684a747f8a 100644
--- a/common/ccd_config.c
+++ b/common/ccd_config.c
@@ -963,14 +963,12 @@ static enum vendor_cmd_rc ccd_open(struct vendor_cmd_params *p)
* console. Reject both unless CCD_CAP_OPEN_FROM_USB is enabled.
*/
} else {
-#ifndef CONFIG_CCD_OPEN_PREPVT
/*
* - Battery is present
* - Either not in developer mode or the command came from USB
*/
why_denied = "open from AP in devmode or remove batt";
goto denied;
-#endif
}
/* Fail and abort if already checking physical presence */