]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
remote: add sysusers file to create 'libvirt' group
authorDaniel P. Berrangé <berrange@redhat.com>
Wed, 29 Jan 2025 15:37:46 +0000 (15:37 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Thu, 30 Jan 2025 15:19:35 +0000 (15:19 +0000)
We previously added a sysusers file, but missed the 'libvirt' group.
This group is referenced in the polkit rules, so we should be
registering that too. It must be done in a separate sysusers file,
however, since it is common to all daemons.

Fixes: a2c3e390f7bedf36f4ddc544d09fe3b8772c5c6f
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
libvirt.spec.in
src/remote/libvirt.sysusers.conf [new file with mode: 0644]
src/remote/meson.build

index a82c366334cf48584aef1ea264d2af112662e745..5c5d36966d7172b111a85dfeae4c8a616d2ce341 100644 (file)
@@ -2110,6 +2110,7 @@ exit 0
 %{_datadir}/polkit-1/actions/org.libvirt.unix.policy
 %{_datadir}/polkit-1/actions/org.libvirt.api.policy
 %{_datadir}/polkit-1/rules.d/50-libvirt.rules
+%{_sysusersdir}/libvirt.conf
 %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/
 %attr(0755, root, root) %{_libexecdir}/libvirt_iohelper
 %attr(0755, root, root) %{_bindir}/virt-ssh-helper
diff --git a/src/remote/libvirt.sysusers.conf b/src/remote/libvirt.sysusers.conf
new file mode 100644 (file)
index 0000000..50c6716
--- /dev/null
@@ -0,0 +1 @@
+g libvirt -
index ea063ed6cc1cc98da5cc51e1fe47f29a8af51a19..e503263266b6a84fb6cdd29bde79c19a0b614229 100644 (file)
@@ -310,6 +310,13 @@ if conf.has('WITH_REMOTE')
       )
     endif
 
+    # Install the sysuser config for the daemon polkit rules
+    install_data(
+      'libvirt.sysusers.conf',
+      install_dir: sysusersdir,
+      rename: [ 'libvirt.conf' ],
+    )
+
     virt_helpers += {
       'name': 'virt-ssh-helper',
       'sources': [