summaryrefslogtreecommitdiffstats
path: root/stap-client
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2010-03-03 17:42:28 -0500
committerDave Brolley <brolley@redhat.com>2010-03-03 17:42:28 -0500
commit36d1a50ace72e06b397d2b5236aaf20771f63eb6 (patch)
tree31655d544c2f79320b194a45b43154e2e7fdf6a2 /stap-client
parentf0d95bac5d76c4b8bdaad4abefa63e3e8e5ad9c3 (diff)
downloadsystemtap-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.
Diffstat (limited to 'stap-client')
-rwxr-xr-xstap-client4
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'