ch: Load ch.conf from SYSCONFDIR

Config files for system instances of our drivers (e.g.
"ch:///system", "qemu:///system", etc.) live under /etc/libvirt.
But for some reason, the CH driver was trying to load the config
file from /var/lib/libvirt/ch/ even though the file is installed
under /etc/libvirt per the following line from src/meson.build:

  install_data(virt_conf_files, install_dir: confdir)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
Michal Privoznik
2025-10-31 13:14:12 +01:00
parent 4c5021bc92
commit 3299ce060f
+1 -2
View File
@@ -178,8 +178,7 @@ virCHDriverConfigNew(bool privileged)
cfg->logDir = g_strdup_printf("%s/log/libvirt/ch", LOCALSTATEDIR);
cfg->stateDir = g_strdup_printf("%s/libvirt/ch", RUNSTATEDIR);
cfg->saveDir = g_strdup_printf("%s/lib/libvirt/ch/save", LOCALSTATEDIR);
cfg->configDir = g_strdup_printf("%s/lib/libvirt/ch", LOCALSTATEDIR);
cfg->configDir = g_strdup(SYSCONFDIR "/libvirt");
} else {
g_autofree char *rundir = NULL;
g_autofree char *cachedir = NULL;