mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
There is a bug in the vtpm_manager that has to do with hashing and saving the NVM memory files (vtpm_dm_%d.data). The file is not truncated when it is written and this results in the hash becoming invalid because of the extra bits at the end of the file. This patch adds O_TRUNC to the flags when opening the file. More details on this issue are in the bug report on bugzilla=20 http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=3D1488 Signed-off-by: Matt Fioravante <Matthew.Fioravante@jhuapl.edu>