From b63bd727f983853c14086cd2005221e9dc179ccb Mon Sep 17 00:00:00 2001 From: Roberto Hueso Gómez Date: Wed, 13 May 2020 14:15:44 +0200 Subject: Change permissions on virtual images for /refresh Write permission is not needed to get information about each virtual drive so this patch changes permissions to 'only read'. This can prevent race conditions. --- src/virtual/ogOperations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/virtual/ogOperations.py b/src/virtual/ogOperations.py index a92f28f..02f50da 100644 --- a/src/virtual/ogOperations.py +++ b/src/virtual/ogOperations.py @@ -268,7 +268,7 @@ class OgVirtualOperations: g = guestfs.GuestFS(python_return_dict=True) g.add_drive_opts(part['virt-drive'], format="qcow2", - readonly=0) + readonly=1) g.launch() devices = g.list_devices() assert(len(devices) == 1) -- cgit v1.2.3-18-g5258