diff options
author | Dave Brolley <brolley@redhat.com> | 2010-03-03 17:42:28 -0500 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2010-03-03 17:42:28 -0500 |
commit | 36d1a50ace72e06b397d2b5236aaf20771f63eb6 (patch) | |
tree | 31655d544c2f79320b194a45b43154e2e7fdf6a2 | |
parent | f0d95bac5d76c4b8bdaad4abefa63e3e8e5ad9c3 (diff) | |
download | systemtap-steved-36d1a50ace72e06b397d2b5236aaf20771f63eb6.tar.gz systemtap-steved-36d1a50ace72e06b397d2b5236aaf20771f63eb6.tar.xz systemtap-steved-36d1a50ace72e06b397d2b5236aaf20771f63eb6.zip |
Set a timeout when prompting for consent to trust a server as a SSL peer.
-rwxr-xr-x | stap-client | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/stap-client b/stap-client index 10b82082..12801c88 100755 --- a/stap-client +++ b/stap-client @@ -787,7 +787,7 @@ function attempt_connection { if test $session_only_prompt_done = 0; then session_only_prompt_done=1 prompt="${prompt}Trust this server for for this session only? [y/N] " - read -p "$prompt" response + read -t 30 -p "$prompt" response || echo n if test "$response" = "y" -o "$response" = "Y"; then ${stap_pkglibexecdir}stap-client-connect "$@" -t session >> "$tmpdir_client/connect" 2>&1 & wait '%${stap_pkglibexecdir}stap-client-connect' @@ -801,7 +801,7 @@ function attempt_connection { " fi prompt="${prompt}Add this server's certificate to '$ssl_db'? [y/N] " - read -p "$prompt" response + read -t 30 -p "$prompt" response || echo n if test "$response" = "y" -o "$response" = "Y"; then ${stap_pkglibexecdir}stap-client-connect "$@" -t permanent >> "$tmpdir_client/connect" 2>&1 & wait '%${stap_pkglibexecdir}stap-client-connect' |