mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
qemu.conf: Allow users to enable/disable label remembering
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
1845991d9b
commit
e05d8e570b
@ -71,6 +71,7 @@ module Libvirtd_qemu =
|
||||
| str_entry "user"
|
||||
| str_entry "group"
|
||||
| bool_entry "dynamic_ownership"
|
||||
| bool_entry "remember_owner"
|
||||
| str_array_entry "cgroup_controllers"
|
||||
| str_array_entry "cgroup_device_acl"
|
||||
| int_entry "seccomp_sandbox"
|
||||
|
@ -450,6 +450,10 @@
|
||||
# Set to 0 to disable file ownership changes.
|
||||
#dynamic_ownership = 1
|
||||
|
||||
# Whether libvirt should remember and restore the original
|
||||
# ownership over files it is relabeling. Defaults to 1, set
|
||||
# to 0 to disable the feature.
|
||||
#remember_owner = 1
|
||||
|
||||
# What cgroup controllers to make use of with QEMU guests
|
||||
#
|
||||
|
@ -145,6 +145,7 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged)
|
||||
cfg->group = (gid_t)-1;
|
||||
}
|
||||
cfg->dynamicOwnership = privileged;
|
||||
cfg->rememberOwner = true;
|
||||
|
||||
cfg->cgroupControllers = -1; /* -1 == auto-detect */
|
||||
|
||||
@ -728,6 +729,9 @@ int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg,
|
||||
if (virConfGetValueBool(conf, "dynamic_ownership", &cfg->dynamicOwnership) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (virConfGetValueBool(conf, "remember_owner", &cfg->rememberOwner) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (virConfGetValueStringList(conf, "cgroup_controllers", false,
|
||||
&controllers) < 0)
|
||||
goto cleanup;
|
||||
|
@ -43,6 +43,7 @@ module Test_libvirtd_qemu =
|
||||
{ "user" = "root" }
|
||||
{ "group" = "root" }
|
||||
{ "dynamic_ownership" = "1" }
|
||||
{ "remember_owner" = "1" }
|
||||
{ "cgroup_controllers"
|
||||
{ "1" = "cpu" }
|
||||
{ "2" = "devices" }
|
||||
|
Loading…
Reference in New Issue
Block a user