mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-31 05:47:15 +03:00
qemu: conf: add seccomp_sandbox option
This commit is contained in:
parent
ede22e58ff
commit
1ccf22277b
@ -50,6 +50,7 @@ module Libvirtd_qemu =
|
|||||||
| bool_entry "dynamic_ownership"
|
| bool_entry "dynamic_ownership"
|
||||||
| str_array_entry "cgroup_controllers"
|
| str_array_entry "cgroup_controllers"
|
||||||
| str_array_entry "cgroup_device_acl"
|
| str_array_entry "cgroup_device_acl"
|
||||||
|
| int_entry "seccomp_sandbox"
|
||||||
|
|
||||||
let save_entry = str_entry "save_image_format"
|
let save_entry = str_entry "save_image_format"
|
||||||
| str_entry "dump_image_format"
|
| str_entry "dump_image_format"
|
||||||
|
@ -378,3 +378,11 @@
|
|||||||
#
|
#
|
||||||
#keepalive_interval = 5
|
#keepalive_interval = 5
|
||||||
#keepalive_count = 5
|
#keepalive_count = 5
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Use seccomp syscall whitelisting in QEMU.
|
||||||
|
# 1 = on, 0 = off, -1 = use QEMU default
|
||||||
|
# Defaults to -1.
|
||||||
|
#
|
||||||
|
#seccomp_sandbox = 1
|
||||||
|
@ -129,6 +129,7 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
|
|||||||
|
|
||||||
driver->keepAliveInterval = 5;
|
driver->keepAliveInterval = 5;
|
||||||
driver->keepAliveCount = 5;
|
driver->keepAliveCount = 5;
|
||||||
|
driver->seccompSandbox = -1;
|
||||||
|
|
||||||
/* Just check the file is readable before opening it, otherwise
|
/* Just check the file is readable before opening it, otherwise
|
||||||
* libvirt emits an error.
|
* libvirt emits an error.
|
||||||
@ -570,6 +571,10 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
|
|||||||
CHECK_TYPE("keepalive_count", VIR_CONF_LONG);
|
CHECK_TYPE("keepalive_count", VIR_CONF_LONG);
|
||||||
if (p) driver->keepAliveCount = p->l;
|
if (p) driver->keepAliveCount = p->l;
|
||||||
|
|
||||||
|
p = virConfGetValue(conf, "seccomp_sandbox");
|
||||||
|
CHECK_TYPE("seccomp_sandbox", VIR_CONF_LONG);
|
||||||
|
if (p) driver->seccompSandbox = p->l;
|
||||||
|
|
||||||
virConfFree (conf);
|
virConfFree (conf);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -152,6 +152,7 @@ struct qemud_driver {
|
|||||||
|
|
||||||
int keepAliveInterval;
|
int keepAliveInterval;
|
||||||
unsigned int keepAliveCount;
|
unsigned int keepAliveCount;
|
||||||
|
int seccompSandbox;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _qemuDomainCmdlineDef qemuDomainCmdlineDef;
|
typedef struct _qemuDomainCmdlineDef qemuDomainCmdlineDef;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user