head: Fixed TOCTOU bug in checking of metadata#12439
Conversation
|
GNU testsuite comparison: |
|
This should be catched at 1st read. But it is currently difficult since we don't distinct read error and write error #12265 . |
|
I don't see how the write error proposed in the PR would be incorporated? We don't have a specific metadata access error so does that need to be added? Otherwise it can fail at two different points with the same error. |
|
We can just remove |
|
Oh I see. To confirm, once |
|
I think we can just do somethin like |
|
How would this look with all of the |
Fixes #11972.
Doesn't look exploitable in any degree but lack of TOCTOU is perhaps nice to have.
Not sure if a closure was the best way to do
print_header, very open to alternative approaches.