|
|
@ -1,21 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
Summary: User space tools for kernel auditing
|
|
|
|
Summary: User space tools for kernel auditing
|
|
|
|
Name: audit
|
|
|
|
Name: audit
|
|
|
|
Version: 3.0.7
|
|
|
|
Version: 3.1.5
|
|
|
|
Release: 104%{?dist}
|
|
|
|
Release: 1%{?dist}
|
|
|
|
License: GPLv2+
|
|
|
|
License: GPLv2+
|
|
|
|
URL: http://people.redhat.com/sgrubb/audit/
|
|
|
|
URL: http://people.redhat.com/sgrubb/audit/
|
|
|
|
Source0: http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz
|
|
|
|
Source0: http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz
|
|
|
|
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
|
|
|
|
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
|
|
|
|
|
|
|
|
|
|
|
|
Patch1: 0001-Add-ausysrulevalidate.patch
|
|
|
|
Patch1: 0001-Add-ausysrulevalidate.patch
|
|
|
|
Patch2: audit-3.0.7-gcc-flags.patch
|
|
|
|
|
|
|
|
Patch3: audit-3.0.8-auparse-path-norm.patch
|
|
|
|
|
|
|
|
Patch4: audit-3.0.8-drop-protecthome.patch
|
|
|
|
|
|
|
|
Patch5: audit-3.0.8-flex-array-workaround.patch
|
|
|
|
|
|
|
|
Patch6: audit-3.0.8-undo-flex-array.patch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Patch7: audit-3.1-fanotify-records.patch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BuildRequires: make gcc swig
|
|
|
|
BuildRequires: make gcc swig
|
|
|
|
BuildRequires: openldap-devel
|
|
|
|
BuildRequires: openldap-devel
|
|
|
@ -26,8 +19,9 @@ BuildRequires: autoconf automake libtool
|
|
|
|
|
|
|
|
|
|
|
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
|
|
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
|
|
|
Requires(post): systemd coreutils
|
|
|
|
Requires(post): systemd coreutils
|
|
|
|
Requires(preun): systemd initscripts-service
|
|
|
|
Requires(preun): systemd
|
|
|
|
Requires(postun): systemd coreutils initscripts-service
|
|
|
|
Requires(postun): systemd coreutils
|
|
|
|
|
|
|
|
Recommends: initscripts-service
|
|
|
|
|
|
|
|
|
|
|
|
# Placing this here under the assumption that anything using the
|
|
|
|
# Placing this here under the assumption that anything using the
|
|
|
|
# python libraries expects the system to have an audit daemon
|
|
|
|
# python libraries expects the system to have an audit daemon
|
|
|
@ -98,14 +92,6 @@ Management Facility) database, through an IBM Tivoli Directory Server
|
|
|
|
%setup -q
|
|
|
|
%setup -q
|
|
|
|
cp %{SOURCE1} .
|
|
|
|
cp %{SOURCE1} .
|
|
|
|
%patch -P 1 -p1
|
|
|
|
%patch -P 1 -p1
|
|
|
|
%patch -P 2 -p1
|
|
|
|
|
|
|
|
%patch -P 3 -p1
|
|
|
|
|
|
|
|
%patch -P 4 -p1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cp /usr/include/linux/audit.h lib/
|
|
|
|
|
|
|
|
%patch -P 5 -p1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%patch -P 7 -p1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
autoreconf -fv --install
|
|
|
|
autoreconf -fv --install
|
|
|
|
|
|
|
|
|
|
|
@ -116,8 +102,8 @@ sed -i 's/ ids / /' audisp/plugins/Makefile.in
|
|
|
|
%configure --with-python=no \
|
|
|
|
%configure --with-python=no \
|
|
|
|
--with-python3=yes \
|
|
|
|
--with-python3=yes \
|
|
|
|
--enable-gssapi-krb5=yes --with-arm --with-aarch64 \
|
|
|
|
--enable-gssapi-krb5=yes --with-arm --with-aarch64 \
|
|
|
|
--with-libcap-ng=yes --enable-zos-remote \
|
|
|
|
--with-libcap-ng=yes --enable-zos-remote --without-golang \
|
|
|
|
--enable-systemd --enable-experimental
|
|
|
|
--enable-systemd --enable-experimental --with-io_uring
|
|
|
|
|
|
|
|
|
|
|
|
make CFLAGS="%{optflags}" %{?_smp_mflags}
|
|
|
|
make CFLAGS="%{optflags}" %{?_smp_mflags}
|
|
|
|
|
|
|
|
|
|
|
@ -134,6 +120,7 @@ make DESTDIR=$RPM_BUILD_ROOT install
|
|
|
|
# Validate sample rules shipped.
|
|
|
|
# Validate sample rules shipped.
|
|
|
|
for r in $RPM_BUILD_ROOT/%{_datadir}/%{name}/sample-rules/*.rules; do
|
|
|
|
for r in $RPM_BUILD_ROOT/%{_datadir}/%{name}/sample-rules/*.rules; do
|
|
|
|
PYTHONPATH=$RPM_BUILD_ROOT/%{python3_sitearch} \
|
|
|
|
PYTHONPATH=$RPM_BUILD_ROOT/%{python3_sitearch} \
|
|
|
|
|
|
|
|
LD_LIBRARY_PATH=$RPM_BUILD_ROOT/%{_libdir} \
|
|
|
|
%{_builddir}/%{name}-%{version}/contrib/ausysrulevalidate \
|
|
|
|
%{_builddir}/%{name}-%{version}/contrib/ausysrulevalidate \
|
|
|
|
--update --rules-file "${r}"
|
|
|
|
--update --rules-file "${r}"
|
|
|
|
done
|
|
|
|
done
|
|
|
@ -149,19 +136,14 @@ find $RPM_BUILD_ROOT/%{_libdir}/python%{python3_version}/site-packages -name '*.
|
|
|
|
touch -r ./audit.spec $RPM_BUILD_ROOT/etc/libaudit.conf
|
|
|
|
touch -r ./audit.spec $RPM_BUILD_ROOT/etc/libaudit.conf
|
|
|
|
touch -r ./audit.spec $RPM_BUILD_ROOT/usr/share/man/man5/libaudit.conf.5.gz
|
|
|
|
touch -r ./audit.spec $RPM_BUILD_ROOT/usr/share/man/man5/libaudit.conf.5.gz
|
|
|
|
|
|
|
|
|
|
|
|
# undo the workaround
|
|
|
|
|
|
|
|
cur=`pwd`
|
|
|
|
|
|
|
|
cd $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
patch -p1 < %{PATCH6}
|
|
|
|
|
|
|
|
find . -name '*.orig' -delete
|
|
|
|
|
|
|
|
cd $cur
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
%check
|
|
|
|
make check
|
|
|
|
make check
|
|
|
|
# Get rid of make files so that they don't get packaged.
|
|
|
|
# Get rid of make files so that they don't get packaged.
|
|
|
|
rm -f rules/Makefile*
|
|
|
|
rm -f rules/Makefile*
|
|
|
|
|
|
|
|
|
|
|
|
%post
|
|
|
|
%post
|
|
|
|
|
|
|
|
%systemd_post auditd.service
|
|
|
|
|
|
|
|
|
|
|
|
# Copy default rules into place on new installation
|
|
|
|
# Copy default rules into place on new installation
|
|
|
|
files=`ls /etc/audit/rules.d/ 2>/dev/null | wc -w`
|
|
|
|
files=`ls /etc/audit/rules.d/ 2>/dev/null | wc -w`
|
|
|
|
if [ "$files" -eq 0 ] ; then
|
|
|
|
if [ "$files" -eq 0 ] ; then
|
|
|
@ -172,17 +154,27 @@ if [ "$files" -eq 0 ] ; then
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
chmod 0600 /etc/audit/rules.d/audit.rules
|
|
|
|
chmod 0600 /etc/audit/rules.d/audit.rules
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
%systemd_post auditd.service
|
|
|
|
|
|
|
|
|
|
|
|
# If upgrading, restart the daemon if it's running
|
|
|
|
|
|
|
|
if [ $1 -eq 2 ]; then
|
|
|
|
|
|
|
|
state=$(systemctl status auditd | awk '/Active:/ { print $2 }')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ $state = "active" ] ; then
|
|
|
|
|
|
|
|
auditctl --signal stop || true
|
|
|
|
|
|
|
|
systemctl start auditd
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
# if installing, start it since preset says we should be running
|
|
|
|
|
|
|
|
elif [ $1 -eq 1 ]; then
|
|
|
|
|
|
|
|
systemctl start auditd
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%preun
|
|
|
|
%systemd_preun auditd.service
|
|
|
|
%systemd_preun auditd.service
|
|
|
|
|
|
|
|
# if uninstalling stop the daemon
|
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
/sbin/service auditd stop > /dev/null 2>&1
|
|
|
|
auditctl --signal stop || true
|
|
|
|
fi
|
|
|
|
# also delete loaded rules if uninstalling
|
|
|
|
|
|
|
|
auditctl -D || true
|
|
|
|
%postun
|
|
|
|
|
|
|
|
if [ $1 -ge 1 ]; then
|
|
|
|
|
|
|
|
/sbin/service auditd condrestart > /dev/null 2>&1 || :
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
%files libs
|
|
|
|
%files libs
|
|
|
@ -247,7 +239,6 @@ fi
|
|
|
|
%attr(750,root,root) %{_libexecdir}/initscripts/legacy-actions/auditd/rotate
|
|
|
|
%attr(750,root,root) %{_libexecdir}/initscripts/legacy-actions/auditd/rotate
|
|
|
|
%attr(750,root,root) %{_libexecdir}/initscripts/legacy-actions/auditd/state
|
|
|
|
%attr(750,root,root) %{_libexecdir}/initscripts/legacy-actions/auditd/state
|
|
|
|
%attr(750,root,root) %{_libexecdir}/initscripts/legacy-actions/auditd/stop
|
|
|
|
%attr(750,root,root) %{_libexecdir}/initscripts/legacy-actions/auditd/stop
|
|
|
|
%attr(750,root,root) %{_libexecdir}/audit-functions
|
|
|
|
|
|
|
|
%ghost %{_localstatedir}/run/auditd.state
|
|
|
|
%ghost %{_localstatedir}/run/auditd.state
|
|
|
|
%attr(-,root,-) %dir %{_var}/log/audit
|
|
|
|
%attr(-,root,-) %dir %{_var}/log/audit
|
|
|
|
%attr(750,root,root) %dir /etc/audit
|
|
|
|
%attr(750,root,root) %dir /etc/audit
|
|
|
@ -257,7 +248,6 @@ fi
|
|
|
|
%ghost %config(noreplace) %attr(600,root,root) /etc/audit/rules.d/audit.rules
|
|
|
|
%ghost %config(noreplace) %attr(600,root,root) /etc/audit/rules.d/audit.rules
|
|
|
|
%ghost %config(noreplace) %attr(640,root,root) /etc/audit/audit.rules
|
|
|
|
%ghost %config(noreplace) %attr(640,root,root) /etc/audit/audit.rules
|
|
|
|
%config(noreplace) %attr(640,root,root) /etc/audit/audit-stop.rules
|
|
|
|
%config(noreplace) %attr(640,root,root) /etc/audit/audit-stop.rules
|
|
|
|
%config(noreplace) %attr(640,root,root) /etc/audit/plugins.d/af_unix.conf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files -n audispd-plugins
|
|
|
|
%files -n audispd-plugins
|
|
|
|
%config(noreplace) %attr(640,root,root) /etc/audit/audisp-remote.conf
|
|
|
|
%config(noreplace) %attr(640,root,root) /etc/audit/audisp-remote.conf
|
|
|
@ -265,13 +255,16 @@ fi
|
|
|
|
%config(noreplace) %attr(640,root,root) /etc/audit/plugins.d/syslog.conf
|
|
|
|
%config(noreplace) %attr(640,root,root) /etc/audit/plugins.d/syslog.conf
|
|
|
|
%config(noreplace) %attr(640,root,root) /etc/audit/audisp-statsd.conf
|
|
|
|
%config(noreplace) %attr(640,root,root) /etc/audit/audisp-statsd.conf
|
|
|
|
%config(noreplace) %attr(640,root,root) /etc/audit/plugins.d/au-statsd.conf
|
|
|
|
%config(noreplace) %attr(640,root,root) /etc/audit/plugins.d/au-statsd.conf
|
|
|
|
|
|
|
|
%config(noreplace) %attr(640,root,root) /etc/audit/plugins.d/af_unix.conf
|
|
|
|
%attr(750,root,root) %{_sbindir}/audisp-remote
|
|
|
|
%attr(750,root,root) %{_sbindir}/audisp-remote
|
|
|
|
%attr(750,root,root) %{_sbindir}/audisp-syslog
|
|
|
|
%attr(750,root,root) %{_sbindir}/audisp-syslog
|
|
|
|
|
|
|
|
%attr(750,root,root) %{_sbindir}/audisp-af_unix
|
|
|
|
%attr(750,root,root) %{_sbindir}/audisp-statsd
|
|
|
|
%attr(750,root,root) %{_sbindir}/audisp-statsd
|
|
|
|
%attr(700,root,root) %dir %{_var}/spool/audit
|
|
|
|
%attr(700,root,root) %dir %{_var}/spool/audit
|
|
|
|
%attr(644,root,root) %{_mandir}/man5/audisp-remote.conf.5.gz
|
|
|
|
%attr(644,root,root) %{_mandir}/man5/audisp-remote.conf.5.gz
|
|
|
|
%attr(644,root,root) %{_mandir}/man8/audisp-remote.8.gz
|
|
|
|
%attr(644,root,root) %{_mandir}/man8/audisp-remote.8.gz
|
|
|
|
%attr(644,root,root) %{_mandir}/man8/audisp-syslog.8.gz
|
|
|
|
%attr(644,root,root) %{_mandir}/man8/audisp-syslog.8.gz
|
|
|
|
|
|
|
|
%attr(644,root,root) %{_mandir}/man8/audisp-af_unix.8.gz
|
|
|
|
%attr(644,root,root) %{_mandir}/man8/audisp-statsd.8.gz
|
|
|
|
%attr(644,root,root) %{_mandir}/man8/audisp-statsd.8.gz
|
|
|
|
|
|
|
|
|
|
|
|
%files -n audispd-plugins-zos
|
|
|
|
%files -n audispd-plugins-zos
|
|
|
@ -282,9 +275,33 @@ fi
|
|
|
|
%attr(750,root,root) %{_sbindir}/audispd-zos-remote
|
|
|
|
%attr(750,root,root) %{_sbindir}/audispd-zos-remote
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
%changelog
|
|
|
|
|
|
|
|
* Tue Jul 09 2024 Attila Lakatos <alakatos@redhat.com> - 3.1.5-1
|
|
|
|
|
|
|
|
- New upstream maintenance release, 3.1.4
|
|
|
|
|
|
|
|
- Prevent scriplets from failing
|
|
|
|
|
|
|
|
- When upgrading, restart the daemon if it's running
|
|
|
|
|
|
|
|
- If uninstalling, stop the daemon
|
|
|
|
|
|
|
|
- auditctl: use pidfd_send_signal for signaling auditd
|
|
|
|
|
|
|
|
Resolves: RHEL-45865
|
|
|
|
|
|
|
|
- Minor doc update
|
|
|
|
|
|
|
|
Resolves: RHEL-5186
|
|
|
|
|
|
|
|
- augenrules: do not exit with failure if in immutable mode
|
|
|
|
|
|
|
|
Resolves: RHEL-40110
|
|
|
|
|
|
|
|
- auditd.service: Disable ProtectControlGroups
|
|
|
|
|
|
|
|
Resolves: RHEL-5197
|
|
|
|
|
|
|
|
- auditctl: correct output when displaying rules with exe/path/dir
|
|
|
|
|
|
|
|
Resolves: RHEL-40243
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Wed Nov 08 2023 Sergio Correia <scorreia@redhat.com> - 3.1.2-2
|
|
|
|
|
|
|
|
- Remove %systemd_preun from %preun scriptlet, as it was causing troubles when removing audit
|
|
|
|
|
|
|
|
Related: RHEL-14896
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Oct 27 2023 Sergio Correia <scorreia@redhat.com> - 3.1.2-1
|
|
|
|
|
|
|
|
- New upstream release, 3.1.2
|
|
|
|
|
|
|
|
Resolves: RHEL-14896
|
|
|
|
|
|
|
|
|
|
|
|
* Thu Jun 22 2023 Radovan Sroka <rsroka@redhat.com> - 3.0.7-104
|
|
|
|
* Thu Jun 22 2023 Radovan Sroka <rsroka@redhat.com> - 3.0.7-104
|
|
|
|
- Introduce new fanotify record fields
|
|
|
|
- Introduce new fanotify record fields
|
|
|
|
Resolves: rhbz#2216666
|
|
|
|
Resolves: rhbz#2216666
|
|
|
|
|
|
|
|
|
|
|
|
* Wed Mar 15 2023 MSVSphere Packaging Team <packager@msvsphere.ru> - 3.0.7-103
|
|
|
|
* Wed Mar 15 2023 MSVSphere Packaging Team <packager@msvsphere.ru> - 3.0.7-103
|
|
|
|
- Rebuilt for MSVSphere 9.1.
|
|
|
|
- Rebuilt for MSVSphere 9.1.
|
|
|
|