Update scriptlets to reload auditd service

When setroubleshoot sedispatch is installed, or updated, auditd needs to be
reloaded so that it runs the new installed plugin. Since auditd needs to know
who reloaded him, `systemctl` can't be used. We need to use `service` script.

This fixes the problem when setroubleshoot is installed, but it doesn't collect
AVC denial messages until the machine is rebooted.

/com/redhat/setroubleshootd interface is not used for years therefore we can
drop it.
This commit is contained in:
Petr Lautrbach 2018-11-29 10:14:37 +01:00
parent 68fd5e93b2
commit ea0d9634a3
1 changed files with 2 additions and 10 deletions

View File

@ -62,14 +62,6 @@ to user preference. The same tools can be run on existing log files.
%{_bindir}/seapplet
%post
dbus-send --system /com/redhat/setroubleshootd com.redhat.SEtroubleshootdIface.restart string:'rpm install' >/dev/null 2>&1 || :
%systemd_post auditd.service
%postun
%systemd_postun_with_restart auditd.service
%prep
%autosetup -p 2
@ -120,10 +112,10 @@ to user preference. The same tools can be run on existing log files.
getent passwd %{username} >/dev/null || useradd -r -U -s /sbin/nologin -d %{pkgvardatadir} %{username}
%post server
%systemd_post auditd.service
/sbin/service auditd reload >/dev/null 2>&1 || :
%postun server
%systemd_postun_with_restart auditd.service
/sbin/service auditd reload >/dev/null 2>&1 || :
%triggerun server -- %{name}-server < 3.2.24-4
chown -R setroubleshoot:setroubleshoot %{pkgvardatadir}