libxl: Rationalise calculation of user to run qemu as
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 15 Sep 2017 15:55:54 +0000 (16:55 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 11 Oct 2017 11:51:22 +0000 (12:51 +0100)
commitbfc8f2555698107efee11054192adb957ef744c4
treee73e98d96931d946019860959366aba872c50b4a
parent6dd27e6ce57df08e265ee1a74f5d9875c645f048
libxl: Rationalise calculation of user to run qemu as

If the config specifies a user we use that.  Otherwise:

When we are not restricting qemu, there is very little point running
it as a different user than root.  Indeed, previously, creating the
"magic" users would cause qemu to become slightly dysfunctional (for
example, you can't insert a cd that the qemu user can't read).
So, in that case, default to running it as root.

Conversely, if restriction is requested, we must insist on running
qemu as a non-root user.

Sadly the admin is still required to create 2^16-epsilon users!

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
docs/man/xl.cfg.pod.5.in
tools/libxl/libxl_dm.c