mcollera / AccessControlDsc

MIT License
13 stars 12 forks source link

NTFSAccessControlEntry Resource Bug - Audit Rule Wipe, Local Service Owner Error #44

Closed bcwilhite closed 5 years ago

bcwilhite commented 5 years ago

Describe the bug

The NTFSAccessControlEntry Resource will complete remove Audit Rules defined for a given path. Furthermore, there's also a bug that will not successfully set the defined permissions if the Local Service is the current owner. Both these bugs are addressed with the same code fix.

To Reproduce

  1. Create a member server 2012 R2 configuration.
  2. On a newly installed OS, modify the Application.evtx permissions.
  3. When the Set-TargetResource runs, it will throw an error.
  4. If audit rules are defined on any path where Set-TargetResource runs, those audit rules are completely removed.

Expected behavior

Apply a configuration without throwing an error or wiping any pre-defined audit rules for a given path.

Screenshots

error

bcwilhite commented 5 years ago

Fixed with PR #45