summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2018-01-04 15:44:17 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2018-02-14 21:35:18 +0000
commit863956803e7bef38e86c5db3c33db79c598bada4 (patch)
tree29942d13f712433b12d1413116d871568e93054f
parenta9607c421e1cc67faca25debc7a124106d39f937 (diff)
downloadchrome-ec-863956803e7bef38e86c5db3c33db79c598bada4.tar.gz
gsctool: use full path when invoking trunks_send
The gsctool utility sometimes is used in environments where path to trunks_send is not set. As a result 'gsctool -t' invocations fail. Let's make sure PATH includes /usr/sbin before trunsk_send is invoked. BRANCH=none BUG=none TEST=verified that gsctool invocations in crosh started in a tab and in a linux shell ran under user 'chronos' do not fail. Change-Id: Ib8af365dc5707cfec19acda9aa0228d33eb4573f Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/851266 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org> (cherry picked from commit 0b9a0688946c76451d0770be9b1fe4de148a4691) Reviewed-on: https://chromium-review.googlesource.com/894350 Tested-by: Sam Hurst <shurst@google.com> Commit-Queue: Sam Hurst <shurst@google.com>
-rw-r--r--extra/usb_updater/gsctool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/extra/usb_updater/gsctool.c b/extra/usb_updater/gsctool.c
index 481231df27..205983e198 100644
--- a/extra/usb_updater/gsctool.c
+++ b/extra/usb_updater/gsctool.c
@@ -287,7 +287,7 @@ static int from_hexascii(char c)
static FILE *tpm_output;
static int ts_write(const void *out, size_t len)
{
- const char *cmd_head = "trunks_send --raw ";
+ const char *cmd_head = "PATH=\"${PATH}:/usr/sbin\" trunks_send --raw ";
size_t head_size = strlen(cmd_head);
char full_command[head_size + 2 * len + 1];
size_t i;