Blame SPECS/fapolicyd.spec

714ab2
Summary: Application Whitelisting Daemon
714ab2
Name: fapolicyd
714ab2
Version: 0.9.1
714ab2
Release: 4%{?dist}
714ab2
License: GPLv3+
714ab2
URL: http://people.redhat.com/sgrubb/fapolicyd
714ab2
Source0: https://people.redhat.com/sgrubb/fapolicyd/%{name}-%{version}.tar.gz
714ab2
BuildRequires: kernel-headers
714ab2
BuildRequires: autoconf automake make gcc libtool
714ab2
BuildRequires: systemd-devel libgcrypt-devel rpm-devel file-devel
714ab2
BuildRequires: libcap-ng-devel libseccomp-devel lmdb-devel
714ab2
BuildRequires: python3-devel
714ab2
BuildRequires: python2-devel
714ab2
Requires(pre): shadow-utils
714ab2
Requires(post): systemd-units
714ab2
Requires(preun): systemd-units
714ab2
Requires(postun): systemd-units
714ab2
714ab2
Patch1: fapolicyd-rules.patch
714ab2
Patch2: fapolicyd-elf-parser.patch
714ab2
714ab2
%description
714ab2
Fapolicyd (File Access Policy Daemon) implements application whitelisting
714ab2
to decide file access rights. Applications that are known via a reputation
714ab2
source are allowed access while unknown applications are not. The daemon
714ab2
makes use of the kernel's fanotify interface to determine file access rights.
714ab2
714ab2
714ab2
%prep
714ab2
%setup -q
714ab2
714ab2
%patch1 -p1 -F3
714ab2
%patch2 -p1 -b .elf-parser
714ab2
714ab2
# generate rules for python
714ab2
sed -i "s/%python2_path%/`readlink -f %{__python2} | sed 's/\//\\\\\//g'`/g" init/%{name}.rules
714ab2
sed -i "s/%python3_path%/`readlink -f %{__python3} | sed 's/\//\\\\\//g'`/g" init/%{name}.rules
714ab2
sed -i "s/%ld_so_path%/`find /usr/lib64/ -type f -name 'ld-2\.*.so' | sed 's/\//\\\\\//g'`/g" init/%{name}.rules
714ab2
714ab2
%build
714ab2
./autogen.sh
714ab2
%configure --with-audit
714ab2
make CFLAGS="%{optflags}" %{?_smp_mflags}
714ab2
714ab2
%install
714ab2
make DESTDIR="%{buildroot}" INSTALL='install -p' install
714ab2
mkdir -p %{buildroot}/%{python3_sitelib}/dnf-plugins/
714ab2
install -p -m 644 dnf/%{name}-dnf-plugin.py %{buildroot}/%{python3_sitelib}/dnf-plugins/
714ab2
install -p -m 644 -D init/%{name}-tmpfiles.conf %{buildroot}/%{_tmpfilesdir}/%{name}.conf
714ab2
mkdir -p %{buildroot}/%{_localstatedir}/lib/%{name}
714ab2
mkdir -p %{buildroot}/run/%{name}
714ab2
714ab2
%pre
714ab2
getent passwd %{name} >/dev/null || useradd -r -M -d %{_localstatedir}/lib/%{name} -s /sbin/nologin -c "Application Whitelisting Daemon" %{name}
714ab2
714ab2
%post
714ab2
%systemd_post %{name}.service
714ab2
714ab2
%preun
714ab2
%systemd_preun %{name}.service
714ab2
714ab2
%postun
714ab2
%systemd_postun_with_restart %{name}.service
714ab2
714ab2
%files
714ab2
%doc README.md
714ab2
%{!?_licensedir:%global license %%doc}
714ab2
%license COPYING
714ab2
%attr(750,root,%{name}) %dir %{_sysconfdir}/%{name}
714ab2
%config(noreplace) %attr(644,root,%{name}) %{_sysconfdir}/%{name}/%{name}.rules
714ab2
%config(noreplace) %attr(644,root,%{name}) %{_sysconfdir}/%{name}/%{name}.conf
714ab2
%attr(644,root,root) %{_unitdir}/%{name}.service
714ab2
%attr(644,root,root) %{_tmpfilesdir}/%{name}.conf
714ab2
%attr(755,root,root) %{_sbindir}/%{name}
714ab2
%attr(755,root,root) %{_sbindir}/%{name}-cli
714ab2
%attr(644,root,root) %{_mandir}/man8/*
714ab2
%attr(644,root,root) %{_mandir}/man5/*
714ab2
%attr(644,root,root) %{_mandir}/man1/*
714ab2
%ghost %{_localstatedir}/log/%{name}-access.log
714ab2
%attr(770,root,%{name}) %dir %{_localstatedir}/lib/%{name}
714ab2
%attr(770,root,%{name}) %dir /run/%{name}
714ab2
%ghost %{_localstatedir}/run/%{name}/%{name}.fifo
714ab2
%ghost %{_localstatedir}/lib/%{name}/data.mdb
714ab2
%ghost %{_localstatedir}/lib/%{name}/lock.mdb
714ab2
%{python3_sitelib}/dnf-plugins/%{name}-dnf-plugin.py
714ab2
%{python3_sitelib}/dnf-plugins/__pycache__/%{name}-dnf-plugin.*.pyc
714ab2
714ab2
%changelog
714ab2
* Tue Mar 03 2020 Radovan Sroka <rsroka@redhat.com> - 0.9.1-4
714ab2
RHEL 8.2 ERRATUM
714ab2
- fixed possible heap buffer overflow in elf parser
714ab2
Resolves: rhbz#1807912
714ab2
714ab2
* Tue Feb 11 2020 Radovan Sroka <rsroka@redhat.com> - 0.9.1-3
714ab2
RHEL 8.2 ERRATUM
714ab2
- fixed build time python interpreter detection (spec)
714ab2
- added python2-devel as a BuildRequires (spec)
714ab2
- allow running bash scripts in home directories
714ab2
Resolves: rhbz#1801872
714ab2
714ab2
* Wed Nov 20 2019 Radovan Sroka <rsroka@redhat.com> - 0.9.1-2
714ab2
RHEL 8.2 ERRATUM
714ab2
- rebase to v0.9.1
714ab2
- updated default configuration with new syntax
714ab2
- removed daemon mounts configuration
714ab2
Resolves: rhbz#1759895
714ab2
- default fapolicyd policy prevents Ansible from running
714ab2
- added ansible rule to default ruleset
714ab2
Resolves: rhbz#1746464
714ab2
- suspicious logs on service start
714ab2
Resolves: rhbz#1747494
714ab2
- fapolicyd blocks dracut from generating initramfs
714ab2
- added dracut rule to default configuration
714ab2
Resolves: rhbz#1757736
714ab2
- fapolicyd fails to identify perl interpreter
714ab2
Resolves: rhbz#1765039
714ab2
714ab2
* Wed Jul 24 2019 Radovan Sroka <rsroka@redhat.com> - 0.8.10-3
714ab2
- added missing manpage for fapolicyd-cli
714ab2
Resolves: rhbz#1708015
714ab2
714ab2
* Mon Jul 22 2019 Radovan Sroka <rsroka@redhat.com> - 0.8.10-2
714ab2
- Convert hashes to lowercase like sha256sum outputs
714ab2
- Stop littering STDOUT output for dnf plugin in fapolicyd
714ab2
Resolves: rhbz#1721496
714ab2
714ab2
* Tue Jun 18 2019 Radovan Sroka <rsroka@redhat.com> - 0.8.10-1
714ab2
- new upstream release
714ab2
Resolves: rhbz#1673323
714ab2
714ab2
* Mon May 06 2019 Radovan Sroka <rsroka@redhat.com> - 0.8.9-1
714ab2
- New upstream release
714ab2
- imported from fedora30
714ab2
  resolves: rhbz#1673323
714ab2
714ab2
* Wed Mar 13 2019 Radovan Sroka <rsroka@redhat.com> - 0.8.8-2
714ab2
- backport some patches to resolve dac_override for fapolicyd
714ab2
714ab2
* Mon Mar 11 2019 Radovan Sroka <rsroka@redhat.com> - 0.8.8-1
714ab2
- New upstream release
714ab2
- Added new DNF plugin that can update the trust database when rpms are installed
714ab2
- Added support for FAN_OPEN_EXEC_PERM
714ab2
714ab2
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.7-3
714ab2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
714ab2
714ab2
714ab2
* Wed Oct 03 2018 Steve Grubb <sgrubb@redhat.com> 0.8.7-1
714ab2
- New upstream bugfix release
714ab2
714ab2
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.6-2
714ab2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
714ab2
714ab2
* Thu Jun 07 2018 Steve Grubb <sgrubb@redhat.com> 0.8.6-1
714ab2
- New upstream feature release
714ab2
714ab2
* Fri May 18 2018 Steve Grubb <sgrubb@redhat.com> 0.8.5-2
714ab2
- Add dist tag (#1579362)
714ab2
714ab2
* Fri Feb 16 2018 Steve Grubb <sgrubb@redhat.com> 0.8.5-1
714ab2
- New release