diff options
author | Steve Kemp <steve@steve.org.uk> | 2012-11-23 23:35:45 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2012-11-23 23:35:45 +0000 |
commit | ffe5fb9eb91894d06e630d89dca8f04d91ea1fdf (patch) | |
tree | 5b56a4ebecf8ff99f874fe347cb7786b936e02dd /lib | |
parent | 461451c4e04b06cabcadb733fa772e633afa972a (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.rb | 6 |
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." |