Skip to content

Ignore inherited ACEs when refreshing Windows write roots - #34392

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/d0df9429efcf299da3ff3c1bce92942684803293
Jul 20, 2026
Merged

Ignore inherited ACEs when refreshing Windows write roots#34392
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/d0df9429efcf299da3ff3c1bce92942684803293

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 20, 2026

Copy link
Copy Markdown

Ignore inherited ACEs when refreshing Windows write roots

Why

An inherited FILE_DELETE_CHILD grant can make a write root look stale, but
SET_ACCESS cannot replace an ACE inherited from an ancestor. Treating that
grant as explicit causes unnecessary ACL refresh attempts that cannot converge.

What changed

  • Add explicit-ACE filtering to the Windows DACL permission checks.
  • Refresh a write root only when FILE_DELETE_CHILD is present in an explicit
    allow ACE, while retaining effective-permission checks for required rights.
  • Ignore inherited stale rights when deciding whether SET_ACCESS must repair
    an allow ACE.

Testing

Add a Windows regression test covering a write root that inherits
FILE_DELETE_CHILD, verifying that repeated refresh checks leave its explicit
write ACE unchanged.

## Why

An inherited `FILE_DELETE_CHILD` grant can make a write root look stale, but
`SET_ACCESS` cannot replace an ACE inherited from an ancestor. Treating that
grant as explicit causes unnecessary ACL refresh attempts that cannot converge.

## What changed

- Add explicit-ACE filtering to the Windows DACL permission checks.
- Refresh a write root only when `FILE_DELETE_CHILD` is present in an explicit
  allow ACE, while retaining effective-permission checks for required rights.
- Ignore inherited stale rights when deciding whether `SET_ACCESS` must repair
  an allow ACE.

## Testing

Add a Windows regression test covering a write root that inherits
`FILE_DELETE_CHILD`, verifying that repeated refresh checks leave its explicit
write ACE unchanged.

GitOrigin-RevId: d0df9429efcf299da3ff3c1bce92942684803293
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/d0df9429efcf299da3ff3c1bce92942684803293 branch from ed3a4b5 to bd92b05 Compare July 20, 2026 18:29
@copyberry
copyberry Bot merged commit bd92b05 into main Jul 20, 2026
18 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/d0df9429efcf299da3ff3c1bce92942684803293 branch July 20, 2026 18:30
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant