From: Ian Campbell Date: Tue, 24 May 2011 14:15:27 +0000 (+0100) Subject: libxl: check that device model binary is executable. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~10322 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=81a4406d6646b7dabc72454fdf5445d1a5188c05;p=xen.git libxl: check that device model binary is executable. This causes us to fail more quickly in more obvious failure case of not having the right binary installed. Signed-off-by: Ian Campbell Acked-by: Ian Jackson Signed-off-by: Ian Jackson --- diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index 47a51c8708..b31ce859e8 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -762,7 +762,12 @@ int libxl__create_device_model(libxl__gc *gc, rc = ERROR_FAIL; goto out; } - + if (access(dm, X_OK) < 0) { + LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, + "device model %s is not executable", dm); + rc = ERROR_FAIL; + goto out; + } args = libxl__build_device_model_args(gc, dm, info, disks, num_disks, vifs, num_vifs); if (!args) {