Skip to content

Add owner-only temporary file creation to PathUtils - #944

Merged
garydgregory merged 1 commit into
apache:masterfrom
garydgregory:createOwnerTempFile
Nov 28, 2026
Merged

garydgregory merged 1 commit into
apache:masterfrom
garydgregory:createOwnerTempFile

Conversation

@garydgregory

Copy link
Copy Markdown
Member

Support POSIX permissions, Windows ACLs, and native macOS ACL handling. Use secured staging directories and hard-link publication on ACL and macOS paths to prevent inherited permissions from exposing new files.

Handle native command timeouts, interruption, and cleanup failures. Add regression tests for permissions, inheritance, and failure handling. Replace SystemUtils checks with JUnit OS annotations in PathUtilsTest.

Document platform requirements with Apple and Microsoft references.

  • Read the contribution guidelines for this project.
  • Read the ASF Generative Tooling Guidance if you use Artificial Intelligence (AI).
  • I used AI to create any part of, or all of, this pull request: GPT-6 Astra Extra High.
  • Run a successful build using the default Maven goal with mvn; that's mvn on the command line by itself.
  • Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied. This may not always be possible, but it is a best practice.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Each commit in the pull request should have a meaningful subject line and body. Note that a maintainer may squash commits during the merge process.

@garydgregory
garydgregory marked this pull request as ready for review November 25, 2026 12:48
Create empty temporary files with owner-only permissions using POSIX
attributes, Windows ACLs, or native macOS ACL handling.

Secure staging directories before creating files on ACL and macOS paths,
then publish through hard links. Handle native command timeouts,
interruption, and cleanup failures.

Add TempFilesTest coverage for permissions, ACL inheritance, unsupported
providers, publication, and failure handling. Document platform
requirements, security assumptions, and supporting references.
@garydgregory
garydgregory merged commit 2692e24 into apache:master Nov 28, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant