diff options
| author | Yuri Pudgorodskiy | 2015-11-12 14:36:20 +0100 |
|---|---|---|
| committer | Michael Roth | 2015-11-17 23:24:18 +0100 |
| commit | 02a4d82e8c19267ad06b08389b5e914ba668450e (patch) | |
| tree | 7562959cecd09ab5ab98854c702d5502ebad239e /qga/commands.c | |
| parent | Merge remote-tracking branch 'remotes/kraxel/tags/pull-vnc-20151116-1' into s... (diff) | |
| download | qemu-02a4d82e8c19267ad06b08389b5e914ba668450e.tar.gz qemu-02a4d82e8c19267ad06b08389b5e914ba668450e.tar.xz qemu-02a4d82e8c19267ad06b08389b5e914ba668450e.zip | |
qga: fix for default env processing for guest-exec
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>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'qga/commands.c')
| -rw-r--r-- | qga/commands.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qga/commands.c b/qga/commands.c index 0f80ce65a4..7644ca053a 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) { |
