run: Pass AMT log password via environment variable

This avoids exposing the cleartext AMT password in the log output.
This commit is contained in:
Adrian-Ken Rueegsegger 2015-12-01 12:10:27 +01:00 committed by Christian Helmuth
parent 184bffbce3
commit a98b94f80e
1 changed files with 6 additions and 1 deletions

View File

@ -34,10 +34,15 @@ proc run_log { wait_for_re timeout_value } {
return false
}
#
# amttool expects in the environment variable AMT_PASSWORD the password
#
set ::env(AMT_PASSWORD) [log_amt_password]
#
# grab output
#
set amt_cmd "amtterm -u admin -p [log_amt_password] -v [log_amt_host]"
set amt_cmd "amtterm -u admin -v [log_amt_host]"
if {[get_cmd_switch --log-amt-filter]} {
set amt_cmd "$amt_cmd | [log_amt_filter]"
}