summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavin Taddeo <davin@chef.io>2020-06-15 11:45:01 -0400
committerDavin Taddeo <davin@chef.io>2020-06-15 11:45:01 -0400
commit2b804baad52719a5ee4b0113434bbba02d930f22 (patch)
tree1c12353370321bb4c3691e0f99651f8e1558eebf
parent286c68c000f02243c33de169e83d0df207d01d76 (diff)
downloadchef-2b804baad52719a5ee4b0113434bbba02d930f22.tar.gz
fix some badly named variables, and added auditpol to the cspell list as I can't change the name of the windows command.
Signed-off-by: Davin Taddeo <davin@chef.io>
-rw-r--r--cspell.json1
-rw-r--r--lib/chef/resource/windows_audit_policy.rb6
2 files changed, 4 insertions, 3 deletions
diff --git a/cspell.json b/cspell.json
index 27c98e509c..1c2e44c8a8 100644
--- a/cspell.json
+++ b/cspell.json
@@ -73,6 +73,7 @@
"attribs",
"attrname",
"auditd",
+ "auditpol",
"AUTHN",
"AUTHROOT",
"AUTHZ",
diff --git a/lib/chef/resource/windows_audit_policy.rb b/lib/chef/resource/windows_audit_policy.rb
index b2dda1ce62..bd5ca5e0dc 100644
--- a/lib/chef/resource/windows_audit_policy.rb
+++ b/lib/chef/resource/windows_audit_policy.rb
@@ -164,10 +164,10 @@ class Chef
CODE
end
- def option_configured?(optname, optsetting)
- setting = optsetting ? "Enabled$" : "Disabled$"
+ def option_configured?(option_name, option_setting)
+ setting = option_setting ? "Enabled$" : "Disabled$"
powershell_exec(<<-CODE).result
- $auditpol_config = auditpol /get /option:#{optname}
+ $auditpol_config = auditpol /get /option:#{option_name}
if ($auditpol_config | Select-String "#{setting}") { return $true } else { return $false }
CODE
end