Skip to content

Commit

Permalink
better check for vmon
Browse files Browse the repository at this point in the history
  • Loading branch information
h00die committed Dec 20, 2023
1 parent a4d6026 commit 1e37440
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,11 @@ def java_wrapper_vmon
end

def check
return CheckCode::Safe("#{java_wrapper_vmon} not found on system") unless file?(java_wrapper_vmon)
return CheckCode::Safe("#{java_wrapper_vmon} not writable") unless writable?(java_wrapper_vmon)

group_owner = cmd_exec("stat -c \"%G\" \"#{java_wrapper_vmon}\"")
if writable?(java_wrapper_vmon) && group_owner == 'cis'
if group_owner == 'cis'
return CheckCode::Appears("#{java_wrapper_vmon} is writable and owned by cis group")
end

Expand Down

0 comments on commit 1e37440

Please sign in to comment.