ayohrling / local_security_policy

Apache License 2.0
6 stars 28 forks source link

Array values are not enforced correctly unless reg_type is specified #89

Closed Andy-Adrian closed 3 years ago

Andy-Adrian commented 4 years ago

Registry Value settings that accept an array do not enforce in the OS correctly when reg_type is not specified. Example:

 local_security_policy {         'Network access: Remotely accessible registry paths':
          ensure => present
          policy_value =>  "System\\CurrentControlSet\\Control\\ProductOptions,System\\CurrentControlSet\\Control\\Server Applications,Software\\Microsoft\\Windows NT\\CurrentVersion"
}

results in a "Not Defined" entry in the OS

 local_security_policy {         'Network access: Remotely accessible registry paths':
          ensure => present
          policy_value =>  "7,System\\CurrentControlSet\\Control\\ProductOptions,System\\CurrentControlSet\\Control\\Server Applications,Software\\Microsoft\\Windows NT\\CurrentVersion"
}

Results in the correct values in the OS

Andy-Adrian commented 3 years ago

Resolved by PR (Value validation updates #90)