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

[libvirt] [PATCH v1 0/2] Fix environment-setting code.

[This patch is for discussion only: I have not proven that
it fixes the bug]


When libvirtd runs any command, it uses a simple strategy to
set the environment for that command:

(a) It creates a new, empty environment array.

(b) It copies in a few known-good environment variables, including TMPDIR.

(c) It appends environment variables specified by the user, eg. ones
specified in <qemu:env>.

Unfortunately this means if you try to set TMPDIR via a <qemu:env> XML
directive, then it is appended to the list of environment variables
which already includes TMPDIR.  The qemu subprocess picks an
environment variable (probably) first from the list, which is the
TMPDIR that libvirtd had originally, not the TMPDIR that was specified
by the user.

This [possibly, not proven] leads to bug 859596, where we see qemu
trying to create temporary files in a directory that no longer exists.

The follow-up patches change libvirtd so that environment variables in
the virCommandPtr array are replaced if they exist already.


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