diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2021-12-14 16:21:44 +0000 |
---|---|---|
committer | Daniel P. Berrangé <berrange@redhat.com> | 2021-12-16 10:02:56 +0000 |
commit | 883f643d70b4ad6a599d07e365cbb7ac2b5d689a (patch) | |
tree | 17ad832485642133abbc2340e16af6377af82d96 /libvirt.spec.in | |
parent | 25a6e4966887327766538bd156bbbdaef8817261 (diff) | |
download | libvirt-883f643d70b4ad6a599d07e365cbb7ac2b5d689a.tar.gz |
rpm: don't start/stop -ro.socket units for virtlockd/virtlogd
These daemons do not have any support for unprivileged readonly
access, so we must not reference -ro.socket units in scripts.
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'libvirt.spec.in')
-rw-r--r-- | libvirt.spec.in | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/libvirt.spec.in b/libvirt.spec.in index cc9436763e..f6c705564a 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1277,14 +1277,18 @@ then \ fi \ %libvirt_daemon_finish_restart %1 +# For daemons with only UNIX sockets %define libvirt_daemon_systemd_post() %systemd_post %1.socket %1-ro.socket %1-admin.socket %1.service - -%define libvirt_daemon_systemd_post_inet() %systemd_post %1.socket %1-ro.socket %1-admin.socket %1-tls.socket %1-tcp.socket %1.service - %define libvirt_daemon_systemd_preun() %systemd_preun %1.service %1-ro.socket %1-admin.socket %1.socket +# For daemons with UNIX and INET sockets +%define libvirt_daemon_systemd_post_inet() %systemd_post %1.socket %1-ro.socket %1-admin.socket %1-tls.socket %1-tcp.socket %1.service %define libvirt_daemon_systemd_preun_inet() %systemd_preun %1.service %1-ro.socket %1-admin.socket %1-tls.socket %1-tcp.socket %1.socket +# For daemons with only UNIX sockets and no unprivileged read-only access +%define libvirt_daemon_systemd_post_priv() %systemd_post %1.socket %1-admin.socket %1.service +%define libvirt_daemon_systemd_preun_priv() %systemd_preun %1.service %1-admin.socket %1.socket + %pre daemon # 'libvirt' group is just to allow password-less polkit access to # libvirtd. The uid number is irrelevant, so we use dynamic allocation @@ -1294,8 +1298,8 @@ getent group libvirt >/dev/null || groupadd -r libvirt exit 0 %post daemon -%libvirt_daemon_systemd_post virtlogd -%libvirt_daemon_systemd_post virtlockd +%libvirt_daemon_systemd_post_priv virtlogd +%libvirt_daemon_systemd_post_priv virtlockd %if %{with_modular_daemons} %libvirt_daemon_systemd_post_inet virtproxyd %else @@ -1311,8 +1315,8 @@ exit 0 %libvirt_daemon_systemd_preun_inet libvirtd %libvirt_daemon_systemd_preun_inet virtproxyd -%libvirt_daemon_systemd_preun virtlogd -%libvirt_daemon_systemd_preun virtlockd +%libvirt_daemon_systemd_preun_priv virtlogd +%libvirt_daemon_systemd_preun_priv virtlockd %postun daemon /bin/systemctl daemon-reload >/dev/null 2>&1 || : |