futility: Replace host_shell with host_exec_output using subprocess
Replace all usages of host_shell() with a new helper function
host_exec_output() that invokes subprocess_run() with an argument
array to avoid system shell evaluation and potential command
injection. In archive fallback, use subprocess_run() directly for
mkdir -p.
BUG=b:293560339, b:537409763
TEST=make runtests
BRANCH=none
TAG=agy
CONV=0ed59c5f-379d-47ac-8eda-adf83afbe0e3
Signed-off-by: Yu-Ping Wu <yupingso@google.com>
Change-Id: I75df038fca834cc3b86b3c78edcaacfe57f7eba0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/8238251
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
Tested-by: Yu-Ping Wu <yupingso@chromium.org>
Auto-Submit: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Hsuan Ting Chen <roccochen@chromium.org>
7 files changed