All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for 2.5 0/2] minor fixes for guest-exec
@ 2015-11-12 13:36 Denis V. Lunev
  2015-11-12 13:36 ` [Qemu-devel] [PATCH 1/2] qga: fix for default env processing " Denis V. Lunev
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Denis V. Lunev @ 2015-11-12 13:36 UTC (permalink / raw)
  Cc: Denis V. Lunev, Yuri Pudgorodskiy, qemu-devel, Michael Roth

Signed-off-by: Yuri Pudgorodskiy <yur@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Michael Roth <mdroth@linux.vnet.ibm.com>

Yuri Pudgorodskiy (2):
[qga] Bugfix of default env processing for guest-exec.
[qga] Enable lookup for the PATH from the passed envp for guest-exec.

qga/commands.c | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PATCH 1/2] qga: fix for default env processing for guest-exec
  2015-11-12 13:36 [Qemu-devel] [PATCH for 2.5 0/2] minor fixes for guest-exec Denis V. Lunev
@ 2015-11-12 13:36 ` Denis V. Lunev
  2015-11-12 13:36 ` [Qemu-devel] [PATCH 2/2] qga: allow to lookup in PATH from the passed envp " Denis V. Lunev
  2015-11-13 22:45 ` [Qemu-devel] [PATCH for 2.5 0/2] minor fixes " Michael Roth
  2 siblings, 0 replies; 4+ messages in thread
From: Denis V. Lunev @ 2015-11-12 13:36 UTC (permalink / raw)
  Cc: Denis V. Lunev, Yuri Pudgorodskiy, qemu-devel, Michael Roth

From: Yuri Pudgorodskiy <yur@virtuozzo.com>

envp == NULL must be passed inside gspawn() if it was not passed with
the command line. Original code inherits environment from the QGA,
which is wrong.

Signed-off-by: Yuri Pudgorodskiy <yur@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qga/commands.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qga/commands.c b/qga/commands.c
index 0f80ce6..7644ca0 100644
--- a/qga/commands.c
+++ b/qga/commands.c
@@ -398,7 +398,7 @@ GuestExec *qmp_guest_exec(const char *path,
     arglist.next = has_arg ? arg : NULL;
 
     argv = guest_exec_get_args(&arglist, true);
-    envp = guest_exec_get_args(has_env ? env : NULL, false);
+    envp = has_env ? guest_exec_get_args(env, false) : NULL;
 
     flags = G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD;
     if (!has_output) {
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PATCH 2/2] qga: allow to lookup in PATH from the passed envp for guest-exec
  2015-11-12 13:36 [Qemu-devel] [PATCH for 2.5 0/2] minor fixes for guest-exec Denis V. Lunev
  2015-11-12 13:36 ` [Qemu-devel] [PATCH 1/2] qga: fix for default env processing " Denis V. Lunev
@ 2015-11-12 13:36 ` Denis V. Lunev
  2015-11-13 22:45 ` [Qemu-devel] [PATCH for 2.5 0/2] minor fixes " Michael Roth
  2 siblings, 0 replies; 4+ messages in thread
From: Denis V. Lunev @ 2015-11-12 13:36 UTC (permalink / raw)
  Cc: Denis V. Lunev, Yuri Pudgorodskiy, qemu-devel, Michael Roth

From: Yuri Pudgorodskiy <yur@virtuozzo.com>

This was original behaviour before GLIB gspawn() rework and we rely on
this behaviour.

Signed-off-by: Yuri Pudgorodskiy <yur@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qga/commands.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/qga/commands.c b/qga/commands.c
index 7644ca0..559f18f 100644
--- a/qga/commands.c
+++ b/qga/commands.c
@@ -400,7 +400,8 @@ GuestExec *qmp_guest_exec(const char *path,
     argv = guest_exec_get_args(&arglist, true);
     envp = has_env ? guest_exec_get_args(env, false) : NULL;
 
-    flags = G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD;
+    flags = G_SPAWN_SEARCH_PATH | G_SPAWN_SEARCH_PATH_FROM_ENVP |
+        G_SPAWN_DO_NOT_REAP_CHILD;
     if (!has_output) {
         flags |= G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL;
     }
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH for 2.5 0/2] minor fixes for guest-exec
  2015-11-12 13:36 [Qemu-devel] [PATCH for 2.5 0/2] minor fixes for guest-exec Denis V. Lunev
  2015-11-12 13:36 ` [Qemu-devel] [PATCH 1/2] qga: fix for default env processing " Denis V. Lunev
  2015-11-12 13:36 ` [Qemu-devel] [PATCH 2/2] qga: allow to lookup in PATH from the passed envp " Denis V. Lunev
@ 2015-11-13 22:45 ` Michael Roth
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Roth @ 2015-11-13 22:45 UTC (permalink / raw)
  To: Denis V. Lunev; +Cc: Yuri Pudgorodskiy, qemu-devel

Quoting Denis V. Lunev (2015-11-12 07:36:19)
> Signed-off-by: Yuri Pudgorodskiy <yur@virtuozzo.com>
> Signed-off-by: Denis V. Lunev <den@openvz.org>
> CC: Michael Roth <mdroth@linux.vnet.ibm.com>
> 
> Yuri Pudgorodskiy (2):
> [qga] Bugfix of default env processing for guest-exec.
> [qga] Enable lookup for the PATH from the passed envp for guest-exec.

Thanks, applied to qga tree and pull sent for 2.5:

  https://github.com/mdroth/qemu/commits/qga 

Confirmed on posix/w32 that we now properly inherit
parent path by default, but don't use it if they're
defined via user-specified env param.

> 
> qga/commands.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-13 22:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-12 13:36 [Qemu-devel] [PATCH for 2.5 0/2] minor fixes for guest-exec Denis V. Lunev
2015-11-12 13:36 ` [Qemu-devel] [PATCH 1/2] qga: fix for default env processing " Denis V. Lunev
2015-11-12 13:36 ` [Qemu-devel] [PATCH 2/2] qga: allow to lookup in PATH from the passed envp " Denis V. Lunev
2015-11-13 22:45 ` [Qemu-devel] [PATCH for 2.5 0/2] minor fixes " Michael Roth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.