libxl: Fix, specify open mode to QEMU state file.
authorAnthony PERARD <anthony.perard@citrix.com>
Wed, 21 Dec 2011 14:47:26 +0000 (14:47 +0000)
committerAnthony PERARD <anthony.perard@citrix.com>
Wed, 21 Dec 2011 14:47:26 +0000 (14:47 +0000)
Reported-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl_dom.c

index 47e908baada49be99125fca8a257f6d19b83d35e..c898d897735faf8b3321760c514f53d79c29ca21 100644 (file)
@@ -623,7 +623,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");