Skip to content

Commit 4ade798

Browse files
committed
Fix check for juju-run path
1 parent c94763b commit 4ade798

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

modules/exploits/linux/local/juju_run_agent_priv_esc.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ def initialize(info = {})
5555
def check
5656
juju_run_path = cmd_exec 'which juju-run'
5757

58-
if juju_run_path.blank?
59-
vprint_error 'juju-run is NOT installed'
60-
return CheckCode::Safe
58+
if juju_run_path.start_with? '/'
59+
vprint_good 'juju-run is installed'
60+
return CheckCode::Detected
6161
end
6262

63-
vprint_good 'juju-run is installed'
63+
vprint_error 'juju-run is NOT installed'
6464

65-
CheckCode::Detected
65+
CheckCode::Safe
6666
end
6767

6868
def unit_names

0 commit comments

Comments
 (0)