diff options
author | Vadim Bendebury <vbendeb@google.com> | 2018-02-06 13:45:24 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2018-02-06 22:09:47 +0000 |
commit | bb19ebf1dffcc894f1406c47d6b2bb8cdd6d363a (patch) | |
tree | 7231e952dda351805f963f16517496d5dbf03a5d | |
parent | d798dd31813d978a9f26258b21c623945e217940 (diff) | |
download | chrome-ec-bb19ebf1dffcc894f1406c47d6b2bb8cdd6d363a.tar.gz |
ccd: disable CCD temporarilyv1.9308_87_mp
This will allow to release an MP image withouth geopardizing devices'
security.
BRANCH=none
BUG=none
TEST=verified that ccd subcommands open and unlock fail both wnen
issued on the Cr50 console and through gsctool, and the
'CCD is disabled in this image'
message is printed on the Cr50 console.
Change-Id: Ied66293efb573777e8d0ea024211dcd30069edab
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/905569
Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r-- | common/ccd_config.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/ccd_config.c b/common/ccd_config.c index 3e8165e97f..41b1bc7f43 100644 --- a/common/ccd_config.c +++ b/common/ccd_config.c @@ -1501,6 +1501,7 @@ static enum vendor_cmd_rc ccd_vendor(enum vendor_cmd_cc code, } if (handler) { +#ifdef CR50_DEV *response_size = 0; /* Let's be optimistic: 0 means success. */ rc = handler(buf + 1, input_size - 1, response_size); @@ -1510,6 +1511,12 @@ static enum vendor_cmd_rc ccd_vendor(enum vendor_cmd_cc code, * place in the response buffer. */ memmove(buf, buf + 1, *response_size); +#else + *response_size = 1; + ((uint8_t *)buf)[0] = EC_ERROR_ACCESS_DENIED; + ccprintf("CCD is disabled in this image\n"); + rc = VENDOR_RC_NOT_ALLOWED; +#endif } else { rc = VENDOR_RC_NO_SUCH_SUBCOMMAND; *response_size = 0; |