summaryrefslogtreecommitdiff
path: root/lib
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
commit67ba812adc4b05410a8fad72b0040e481e1f07e8 (patch)
tree5b56a4ebecf8ff99f874fe347cb7786b936e02dd /lib
parente3ec9b323e3c67b711b5bc8f4df6c90021232261 (diff)
Avoid the use of the shell - even after we've validated the hostname we're going to use.
Diffstat (limited to 'lib')
-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."