summaryrefslogtreecommitdiff
path: root/lib/custodian/protocoltest
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-11-23 23:35:45 +0000
committerSteve Kemp <steve@steve.org.uk>2012-11-23 23:35:45 +0000
commitffe5fb9eb91894d06e630d89dca8f04d91ea1fdf (patch)
tree5b56a4ebecf8ff99f874fe347cb7786b936e02dd /lib/custodian/protocoltest
parent461451c4e04b06cabcadb733fa772e633afa972a (diff)
Avoid the use of the shell - even after we've validated the hostname we're going to use.
Diffstat (limited to 'lib/custodian/protocoltest')
-rw-r--r--lib/custodian/protocoltest/ping.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/custodian/protocoltest/ping.rb b/lib/custodian/protocoltest/ping.rb
index 95b387c..c23e98d 100644
--- a/lib/custodian/protocoltest/ping.rb
+++ b/lib/custodian/protocoltest/ping.rb
@@ -31,7 +31,7 @@ module Custodian
#
# Save the host
#
- @host = line.split( /\s+/)[0]
+ @host = line.split( /\s+/)[0]
#
# Is this test inverted?
@@ -86,9 +86,9 @@ module Custodian
#
- # Run the test.
+ # Run the test: Avoiding the use of the shell.
#
- if ( system( "#{binary} #{host}" ) == true )
+ if ( system( binary, host ) == true )
return true
else
@error = "Ping failed."