Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Introduce tempfile improvements #852

Merged
merged 2 commits into from
Jan 9, 2025

Conversation

n0toose
Copy link
Member

@n0toose n0toose commented Jan 5, 2025

Ported from #816, introduces a few improvements to our temporary file implementation.

The changes remove our custom UUID in our temporary directories, but introduce UUIDs in temporary files. A justification for this change is mentioned here: #816 (comment)

tempfile's newer version, 3.15.0 introduces security improvements that
aim to prevent collisions. Therefore, we should probably not use a
custom suffix anymore.
Ported from hermit-os#816, fixes a regression introduced by
hermit-os/kernel#1529,
which modified the Hermit kernel so that it uses absolute paths instead
of relative ones.
Copy link

codecov bot commented Jan 5, 2025

Codecov Report

Attention: Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.

Project coverage is 71.87%. Comparing base (8d2f7e5) to head (a5b3da6).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/bin/uhyve.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #852      +/-   ##
==========================================
+ Coverage   71.85%   71.87%   +0.01%     
==========================================
  Files          23       23              
  Lines        3063     3065       +2     
==========================================
+ Hits         2201     2203       +2     
  Misses        862      862              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member Author

@n0toose n0toose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Misses the getrandom feature, will make a patch later.

@n0toose
Copy link
Member Author

n0toose commented Jan 5, 2025

Misses the getrandom feature, will make a patch later.

Nevermind, it is enabled by default.

https://github.com/Stebalien/tempfile/pull/317/files#diff-b1a35a68f14e696205874893c07fd24fdb88882b47c23cc0e0c80a30c7d53759R77

@jounathaen jounathaen added this pull request to the merge queue Jan 9, 2025
Merged via the queue into hermit-os:main with commit 92f11ef Jan 9, 2025
11 checks passed
@jounathaen jounathaen deleted the tempfile-improvements branch January 9, 2025 08:56
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants