Re: [PATCH] kvm tools: Make 'vm sandbox' more user-friendly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 07, 2012 at 08:53:59PM +0200, Pekka Enberg wrote:
> This patch changes 'vm sandbox' to automatically prefix a program path with
> "/host" in the guest side making this, for example, work as expected:
> 
>   $ ./vm sandbox -- ~/trinity/trinity --mode=random --dangerous
> 
> Cc: Asias He <asias.hejun@xxxxxxxxx>
> Cc: Cyrill Gorcunov <gorcunov@xxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxx>
> Cc: Sasha Levin <levinsasha928@xxxxxxxxx>
> Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx>
> ---
>  tools/kvm/builtin-run.c |   29 ++++++++++++++++++++++++++---
>  1 files changed, 26 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c
> index 6acc490..ce76b69 100644
> --- a/tools/kvm/builtin-run.c
> +++ b/tools/kvm/builtin-run.c
> @@ -847,9 +847,26 @@ static void kvm_write_sandbox_cmd_exactly(int fd, const char *arg)
>  	}
>  }
>  
> +static void resolve_program(const char *src, char *dst, size_t len)
> +{
> +	struct stat st;
> +
> +	stat(src, &st);

Hi Pekka, looks cool! I suspect we might need to add
a check if stat call has not been failed, on top of this
patch course ;)

	Cyrill
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux