Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Introduce tempfile improvements #852

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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).

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

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.

2 participants