[libvirt] [PATCH 6/7] lxc: Verify root fs exists before mounting

Eric Blake eblake at redhat.com
Thu Jun 2 20:24:36 UTC 2011


On 06/02/2011 01:40 PM, Cole Robinson wrote:
> Otherwise the following virFileMakePath will create the directory for
> us and fail further ahead, which probably isn't intended.
> 
> Signed-off-by: Cole Robinson <crobinso at redhat.com>
> ---
>  src/lxc/lxc_controller.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
> index c94d0d0..7d60090 100644
> --- a/src/lxc/lxc_controller.c
> +++ b/src/lxc/lxc_controller.c
> @@ -664,6 +664,14 @@ lxcControllerRun(virDomainDefPtr def,
>       */
>      if (root) {
>          VIR_DEBUG("Setting up private /dev/pts");
> +
> +        if (!virFileExists(root->src)) {
> +            virReportSystemError(errno,
> +                                 _("root source %s does not exist"),
> +                                 root->src);
> +            goto cleanup;
> +        }

ACK.  This one's simple enough and qualifies as a bug-fix that you could
rebase it to push now prior to 0.9.2; or you can just wait until the
release and push with the rest of the series.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110602/c7635f04/attachment-0001.sig>


More information about the libvir-list mailing list