summaryrefslogtreecommitdiffstats
path: root/fish/alloc.c
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2010-10-21 23:05:26 +0100
committerRichard W.M. Jones <rjones@redhat.com>2010-10-22 17:45:06 +0100
commit0c1d3c02a8147617ee0646e37d011235abdd2c22 (patch)
treeaa7a73c83c09065a00383431cc04052b74e73081 /fish/alloc.c
parent14490c3e1aac61c6ac90f28828896683f64f0dc9 (diff)
downloadlibguestfs-0c1d3c02a8147617ee0646e37d011235abdd2c22.tar.gz
libguestfs-0c1d3c02a8147617ee0646e37d011235abdd2c22.tar.xz
libguestfs-0c1d3c02a8147617ee0646e37d011235abdd2c22.zip
fish: Specify format of disks (RHBZ#642934,CVE-2010-3851).
For libvirt guests, the disk format is copied from libvirt (if libvirt knows it). For command line disk images, you can use --format to override format auto-detection.
Diffstat (limited to 'fish/alloc.c')
-rw-r--r--fish/alloc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fish/alloc.c b/fish/alloc.c
index 156fcc00..7799e4e1 100644
--- a/fish/alloc.c
+++ b/fish/alloc.c
@@ -133,7 +133,9 @@ alloc_disk (const char *filename, const char *size_str, int add, int sparse)
}
if (add) {
- if (guestfs_add_drive (g, filename) == -1) {
+ if (guestfs_add_drive_opts (g, filename,
+ GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw",
+ -1) == -1) {
unlink (filename);
return -1;
}