From: Keir Fraser Date: Wed, 18 Jun 2008 08:39:14 +0000 (+0100) Subject: ioemu: Disable format auto-probing in monitor command change X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14192^2~51 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0a8346854e56486156268113c4632e6f2545bc93;p=xen.git ioemu: Disable format auto-probing in monitor command change Format auto-probing of writable images is a security hole. The last known remaining instance is monitor command change. Disable probing there and use raw. This breaks change for images in all other formats. Signed-off-by: Markus Armbruster --- diff --git a/tools/ioemu/monitor.c b/tools/ioemu/monitor.c index f15a0dd376..50ff243e5d 100644 --- a/tools/ioemu/monitor.c +++ b/tools/ioemu/monitor.c @@ -387,7 +387,7 @@ static void do_change_block(const char *device, const char *filename) } if (eject_device(bs, 0) < 0) return; - bdrv_open(bs, filename, 0); + bdrv_open2(bs, filename, 0, &bdrv_raw); if (bdrv_is_encrypted(bs)) { term_printf("%s is encrypted.\n", device); for(i = 0; i < 3; i++) {