The fix seems sound and incorporates the feedback from Nikola and Daniel. I have a minor issue with one part but overall the fix is good.
The resolve_driver_format method works as if there could be multiple lines within a disk.info file. Since the file is now per instance I don't see why it would need to be opened in append mode, or need to iterate over multiple lines in the file. But this is cleanup and not relevant to the security fix aspect of the patch.
The fix seems sound and incorporates the feedback from Nikola and Daniel. I have a minor issue with one part but overall the fix is good.
The resolve_ driver_ format method works as if there could be multiple lines within a disk.info file. Since the file is now per instance I don't see why it would need to be opened in append mode, or need to iterate over multiple lines in the file. But this is cleanup and not relevant to the security fix aspect of the patch.