From ffe5fb9eb91894d06e630d89dca8f04d91ea1fdf Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Fri, 23 Nov 2012 23:35:45 +0000 Subject: Avoid the use of the shell - even after we've validated the hostname we're going to use. --- lib/custodian/protocoltest/ping.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/custodian') 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." -- cgit v1.2.1