Commit
6ef823fd added '-nodefaults' to the qemu args created by
libxl, which is a good step in restricting qemu's default
configuration. This change takes another step by adding
-no-user-config, which ignores any user-provided config files in
sysconfdir. Together, -nodefaults and -no-user-config allow Xen
to avoid unkown and uncontrolled qemu configuration.
Both options are also added to the qemu invocation in the
xen-qemu-dom0-disk-backend systemd service file.
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
ExecStart=@qemu_xen_systemd@ -xen-domid 0 \
-xen-attach -name dom0 -nographic -M xenpv -daemonize \
-monitor /dev/null -serial /dev/null -parallel /dev/null \
+ -nodefaults -no-user-config \
-pidfile @XEN_RUN_DIR@/qemu-dom0.pid
[Install]
*/
flexarray_append(dm_args, "-nodefaults");
+ /*
+ * Do not use any of the user-provided config files in sysconfdir,
+ * avoiding unkown and uncontrolled configuration.
+ */
+ flexarray_append(dm_args, "-no-user-config");
+
if (b_info->type == LIBXL_DOMAIN_TYPE_PV) {
flexarray_append(dm_args, "-xen-attach");
}