]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
ch: Load ch.conf from SYSCONFDIR
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 23 Oct 2025 13:33:04 +0000 (15:33 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 31 Oct 2025 12:14:12 +0000 (13:14 +0100)
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>
src/ch/ch_conf.c

index 8a542eef19f4d4fa523ef4af3171d2cd74478220..6896683b7fce4940d916fa01712906df589dc36d 100644 (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;