mirror of https://github.com/raandree/NTFSSecurity
Browse Source
Set-Acl compares AreAuditRulesProtected of the new descriptor with AreAccessRulesProtected of the item (FileSystemSecurity.cs in PowerShell), so it also writes the audit section of an item whose DACL is protected. Without the Security privilege that fails with PrivilegeNotHeldException: after Disable-NTFSAccessInheritance, Add-TestDenyRule added nothing, and the take-ownership test of PathErrors.Tests.ps1 failed as a basic user. With the privilege, Set-Acl wrote all sections and dropped the audit entries of the item. Add-TestDenyRule now writes only the DACL with SetAccessControl. Two regression tests cover both effects; each failed before the change in its configuration. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: AI Assistant <ai@example.com>ai/release-5.0.0-rc6
2 changed files with 47 additions and 1 deletions
Loading…
Reference in new issue