util/os_file: always use the 'grow' mechanism
Use fstat()
only to pre-allocate a big enough buffer.
This fixes a race where if the file grows between fstat()
and read()
we would be missing the end of the file, and if the file slims down
read()
would just fail.
Fixes: 31696470 "util: add os_read_file() helper"
This fixes the issues spotted by @jekstrand in MR !72
Edited by Eric Engestrom