qemu: Don't enable seclabel remembering for session mode

The session daemon is unable to set XATTRs in 'trusted'
namespace because it doesn't run as privileged process.
Therefore, when creating the default qemu config enable
rememberOwner only when running as privileged process.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Michal Privoznik 2019-01-10 13:53:33 +01:00
parent 7fb5e319d9
commit 2ebcff3a74

View File

@ -145,7 +145,7 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged)
cfg->group = (gid_t)-1;
}
cfg->dynamicOwnership = privileged;
cfg->rememberOwner = true;
cfg->rememberOwner = privileged;
cfg->cgroupControllers = -1; /* -1 == auto-detect */