]> xenbits.xensource.com Git - libvirt.git/commitdiff
systemd: Only set @sockmode@ once
authorAndrea Bolognani <abologna@redhat.com>
Tue, 19 Sep 2023 13:36:18 +0000 (15:36 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 26 Sep 2023 14:57:50 +0000 (16:57 +0200)
The decision is based only on whether Polkit support is enabled,
so there's no need to go through it again for every single
service.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/meson.build

index 3fae80d67c294fbcb5015b31286f5fab994376c7..9d5085a8aa02e7c7b36fead4dbb885bcf903ec54 100644 (file)
@@ -797,13 +797,13 @@ if conf.has('WITH_LIBVIRTD')
       install_dir: systemd_unit_dir,
     )
 
-    foreach unit : virt_daemon_units
-      if conf.has('WITH_POLKIT')
-        sockmode = '0666'
-      else
-        sockmode = '0600'
-      endif
+    if conf.has('WITH_POLKIT')
+      sockmode = '0666'
+    else
+      sockmode = '0600'
+    endif
 
+    foreach unit : virt_daemon_units
       unit_conf = configuration_data({
         'runstatedir': runstatedir,
         'sbindir': sbindir,