Skip to contentSkip to conversation

libxl: Fix, specify open mode to QEMU state file.

PATCH In review Anthony PERARD 2 participants 2 messages Dec 21, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxl: Fix, specify open mode to QEMU state file.

---
 tools/libxl/libxl_dom.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tools/libxl/libxl_dom.c +1 -1
index 7683601..70ddae2 100644
@@ -624,7 +624,7 @@ int libxl__domain_save_device_model(libxl__gc *gc, uint32_t domid, int fd)
         break;
     }
     case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN:
-        fd2 = open(filename, O_WRONLY | O_CREAT | O_TRUNC);
+        fd2 = open(filename, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
         if (fd2 < 0) {
             LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
                              "Unable to create a QEMU save file\n");
Signature · 1 line
tg: (49ec8ad..) fix/xl-save-open-mode-for-open-migrate (depends on: master)