-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
mktemp: wrong prefix verification #4378
Labels
Comments
Here is the call that caused the issue with Dracut, after patching my machine everything is ok: |
This comment was marked as duplicate.
This comment was marked as duplicate.
please replace your screenshot by text.
|
I was able to reproduce the issue from the screenshot: GNU mktemp:
uutils mktemp:
Good bug find. The Edit: by the way, the GNU mktemp version I used is 8.30. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Discovery
I started testing uutils/coreutils using the AUR package from coreutils-hybrid, it merges the uutils packages with the ones missing from the standard GNU . I use dracut to resolve the initframes, however when I updated the kernel and the initframes would be recreated I got the following error:
dracut: mktemp -p '/var/tmp/' -d -t dracut.XXXXXX failed.
I checked and found that the mktemp package came from coreutils and that it was already available in uutils.
Issue
Let me tell you that I don't program in Rust, not so much in C. Checking the code of both versions I realized that maybe the author of the code checked the prefix after the join with the path.
Solution
What I did was change the check to prefix only. Passed the tests and apparently everything is ok.
[NOTICE]: I'm from Brazil, it's Carnaval, so maybe I won't respond so quickly 🥳 🍺 🏖️
The text was updated successfully, but these errors were encountered: