@ -1,14 +1,14 @@
%global _hardened_build 1
%global _hardened_build 1
%global selinuxtype targeted
%global selinuxtype targeted
%global moduletype contrib
%global moduletype contrib
%define semodule_version 0.0.3
%define semodule_version 0.0.4
%define notifier_version 0.0.6
%define notifier_version 0.0.6
%bcond_without check
%bcond_without check
Name: usbguard
Name: usbguard
Version: 1.0.0
Version: 1.0.0
Release: 13 %{?dist}
Release: 15 %{?dist}
Summary: A tool for implementing USB device usage policy
Summary: A tool for implementing USB device usage policy
Group: System Environment/Daemons
Group: System Environment/Daemons
License: GPLv2+
License: GPLv2+
@ -51,25 +51,21 @@ BuildRequires: libxslt
BuildRequires: libxml2
BuildRequires: libxml2
Patch1: usbguard-0.7.6-notifier.patch
Patch1: usbguard-0.7.6-notifier.patch
Patch2: usbguard-selinux-rules-d.patch
Patch2: usbguard-audit-capability.patch
Patch3: usbguard-selinux-list-dir.patch
Patch3: usbguard-selinux-audit-capability.patch
Patch4: usbguard-selinux-cpuinfo.patch
Patch4: usbguard-service-pidfile.patch
Patch5: usbguard-audit-capability.patch
Patch5: usbguard-ipc-override-fix.patch
Patch6: usbguard-selinux-audit-capability.patch
Patch6: usbguard-validate-acl.patch
Patch7: usbguard-ipaddressdeny.patch
Patch7: usbguard-notifier-decrease-spam.patch
Patch8: usbguard-ipc-override-fix.patch
Patch8: usbguard-dbus-CVE.patch
Patch9: usbguard-validate-acl.patch
Patch9: usbguard-selinux-dbus-CVE.patch
Patch10: usbguard-notifier-decrease-spam.patch
Patch10: usbguard-dbus-CVE-leak.patch
Patch11: usbguard-notifier-icon-injection.patch
Patch11: usbguard-OOMScoreAdjust.patch
Patch12: usbguard-dbus-CVE.patch
Patch12: usbguard-daemon-race-condition.patch
Patch13: usbguard-selinux-dbus-CVE.patch
Patch13: usbguard-consistent-rules.patch
Patch14: usbguard-dbus-CVE-leak.patch
Patch14: usbguard-missing-doc.patch
Patch15: usbguard-daemon-race-condition.patch
Patch15: usbguard-permanent-rules.patch
Patch16: usbguard-OOMScoreAdjust.patch
Patch16: usbguard-disable-console-log.patch
Patch17: usbguard-consistent-rules.patch
Patch18: usbguard-missing-doc.patch
Patch19: usbguard-permanent-rules.patch
Patch20: usbguard-disable-console-log.patch
%description
%description
The USBGuard software framework helps to protect your computer against rogue USB
The USBGuard software framework helps to protect your computer against rogue USB
@ -147,25 +143,21 @@ device presence changes and displays them as pop-up notifications.
rm -rf src/ThirdParty/{Catch,PEGTL}
rm -rf src/ThirdParty/{Catch,PEGTL}
%patch1 -p1 -b .notifier
%patch1 -p1 -b .notifier
%patch2 -p1 -b .rules-d-selinux
%patch2 -p1 -b .audit-write
%patch3 -p1 -b .list-dir
%patch3 -p1 -b .selinux-audit-write
%patch4 -p1 -b .cpuinfo
%patch4 -p1 -b .pidfile
%patch5 -p1 -b .audit-capability
%patch5 -p1 -b .ipc-override-fix
%patch6 -p1 -b .selinux-audit-capability
%patch6 -p1 -b .validate-acl
%patch7 -p1 -b .ipaddressdeny
%patch7 -p1 -b .notifier-decrease-spam
%patch8 -p1 -b .ipc-override-fix
%patch8 -p1 -b .dbus-CVE
%patch9 -p1 -b .validate-acl
%patch9 -p1 -b .selinux-dbus-CVE
%patch10 -p1 -b .notifier-decrease-spam
%patch10 -p1 -b .dbus-CVE-leak
%patch11 -p1 -b .notifier-icon-injection
%patch11 -p1 -b .oomscore-adjust
%patch12 -p1 -b .dbus-CVE
%patch12 -p1 -b .race-condition
%patch13 -p1 -b .selinux-dbus-CVE
%patch13 -p1 -b .consistent-rules
%patch14 -p1 -b .dbus-CVE-leak
%patch14 -p1 -b .missing-doc
%patch15 -p1 -b .daemon-race
%patch15 -p1 -b .permanent-rules
%patch16 -p1 -b .OOMScoreAdjust
%patch16 -p1 -b .disable-syslog
%patch17 -p1 -b .consistent-rules
%patch18 -p1 -b .missing-doc
%patch19 -p1 -b .permanent-rules
%patch20 -p1 -b .disable-syslog
%build
%build
mkdir -p ./m4
mkdir -p ./m4
@ -330,107 +322,146 @@ fi
%changelog
%changelog
* Wed Jul 26 2023 MSVSphere Packaging Team <packager@msvsphere.ru> - 1.0.0-13
* Thu Jan 12 2023 Attila Lakatos <alakatos@redhat.com> - 1.0.0-15
- Rebuilt for MSVSphere 8.8
- Disable logging to console, logging to syslog is still enabled
Resolves: rhbz#2122109
- Store permanent rules even if RuleFile is not set but RuleFolder is
Resolves: rhbz#2155910
* Thu Jan 12 2023 Attila Lakatos <alakatos@redhat.com> - 1.0.0-13
* Mon Nov 28 2022 Attila Lakatos <alakatos@redhat.com> - 1.0.0-12
- Set OOMScoreAdjust to -1000 in service file
- Set OOMScoreAdjust to -1000 in service file
Resolves: rhbz#2159411
Resolves: rhbz#2097419
- Fix race condition in usbguard-daemon when forking
- Fix race condition in usbguard-daemon when forking
Resolves: rhbz#2159409
Resolves: rhbz#2042345
- Add missing files to documentation
- Add missing files to documentation
Resolves: rhbz#2159412
Resolves: rhbz#2122107
- Disable logging to console, logging to syslog is still enabled
- Store permanent rules even if RuleFile is not set but RuleFolder is
- Neither RuleFolder nor RuleFile exists bugfix
- Neither RuleFolder nor RuleFile exists bugfix
Resolves: rhbz#2159413
Resolves: rhbz#2122109
- Remove build for i686 arch
- Remove build for i686 arch
Resolves: rhbz#2105091
Resolves: rhbz#2126622
* Wed Aug 24 2022 Attila Lakatos <alakatos@redhat.com> - 1.0.0-10
* Tue Aug 16 2022 Attila Lakatos <alakatos@redhat.com> - 1.0.0-11
- Fix unauthorized access via D-bus
- Fix unauthorized access via D-bus
- Fix memory leaks on connection failure to D-bus
- Fix memory leak when connection to dbus is broken
Resolves: rhbz#2059067
Resolves: rhbz#2059068
* Mon Nov 29 2021 Zoltan Fridrich <zfridric@redhat.com> - 1.0.0-8
* Mon Oct 25 2021 Zoltan Fridrich <zfridric@redhat.com> - 1.0.0-10
- change usbguard icon injection
- fix DSP module definition in spec file
- fix DSP module definition in spec file
Resolves: rhbz#2014441
Resolves: rhbz#2014442
- add execstack to spec
- remove IPAddressDeny from usbguard service
Resolves: rhbz#1929364
- fix file conflict when installing usbguard on rhel
Resolves: rhbz#1963271
- fix IPC access control files override
- fix IPC access control files override
Resolves: rhbz#2004511
Resolves: rhbz#2009227
- validate ACL permission existence
- validate ACL permission existence
Resolves: rhbz#2005020
Resolves: rhbz#2009229
- decrease usbguard-notifier spam when denied connection
- decrease usbguard-notifier spam when denied connection
Resolves: rhbz#2000000
Resolves: rhbz#2009226
* Wed Mar 17 2021 Attila Lakatos <alakatos@redhat.com> - 1.0.0-2
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1.0.0-8
- Add CAP_AUDIT_WRITE capability to service file
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Resolves: rhbz#1940060
Related: rhbz#1991688
* Tue Jan 19 2021 Attila Lakatos <alakatos@redhat.com> - 1.0.0-1
* Wed Jul 28 2021 Radovan Sroka <rsroka@redhat.com> - 1.0.0-7
- Rebase to 1.0.0
RHEL 9 BETA
Resolves: rhbz#1887448
- starting usbguard service complains about PIDFile= references a path below legacy directory /var/run/
- Filtering rules by attribute
Resolves: rhbz#1985627
Resolves: rhbz#1873953
- file conflict when installing usbguard on rhel
- Change device policy of multiple devices using rule instead of ID
Resolves: rhbz#1986785
Resolves: rhbz#1852568
* Fri Apr 16 2021 Attila Lakatos <alakatos@redhat.com> - 1.0.0-6
* Tue Aug 11 2020 Attila Lakatos <alakatos@redhat.com> - 0.7.8-7
- Clear executable stack flag on usbguard-notifier
- Do not cause segfault in case of an empty rulesd folder
Resolves: rhbz#1917544
Resolves: rhbz#1738590
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.0.0-5
* Wed Aug 05 2020 Radovan Sroka <rsroka@redhat.com> - 0.7.8-6
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
- RHEL 8.3.0 ERRATUM
- Removed execstack from .spec
* Fri Feb 19 2021 Attila Lakatos <alakatos@redhat.com> - 1.0.0-4
- Removed AuthorizedDefault=wired from the usbguard
- sync with rhel-8.4.0 branch
Resolves: rhbz#1852539
- bundle usbguard-notifier as subpackage
- Missing error message on bad configuration
Resolves: rhbz#1917544
Resolves: rhbz#1857299
- /etc/usbguard/usbguard-daemon.conf file does not contain all default options
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-3
Resolves: rhbz#1862907
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jun 17 2020 Radovan Sroka <rsroka@redhat.com> - 0.7.8-5
* Sat Jan 16 12:49:32 CET 2021 Adrian Reber <adrian@lisas.de> - 1.0.0-2
- RHEL 8.3.0 ERRATUM
- Rebuilt for protobuf 3.14
- Use old-fasioned forking style in unit file
Resolves: rhbz#1846885
* Thu Jan 14 2021 Zoltan Fridrich <zfridric@redhat.com> - 1.0.0-1
- Allow usbguard to read /proc/cpuinfo
- rebase usbguard to 1.0.0
Resolves: rhbz#1847870
- added support for rules covering combination of classes
- Removed notifier's Requires for usbguard-devel
- fix usbguard being killed
Resolves: rhbz#1667395
Resolves: rhbz#1916039
- Allow usbguard to read /dev/urandom
Resolves: rhbz#1861330
Resolves: rhbz#1848618
Resolves: rhbz#1905257
* Wed May 06 2020 Attila Lakatos <alakatos@redhat.com> - 0.7.8-4
* Wed Jan 13 14:43:57 CET 2021 Adrian Reber <adrian@lisas.de> - 0.7.8-6
- RHEL 8.3.0 ERRATUM
- Rebuilt for protobuf 3.14
- Spec file clean up
- Rebase to 0.7.8
* Thu Sep 24 2020 Adrian Reber <adrian@lisas.de> - 0.7.8-5
Resolves: rhbz#1738590
- Rebuilt for protobuf 3.13
- Added selinux subpackage
Resolves: rhbz#1683567
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.8-4
- Added notifier subpackage
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
- Installing /etc/usbguard/rules.d/
Resolves: rhbz#1667395
* Wed Jun 24 2020 Radovan Sroka <rsroka@redhat.com> - 0.7.8-3
- Fixed sigwaitinfo handling
- rebase selinux tarball to v0.0.4
Resolves: rhbz#1835210
- enable forking style in unit file
- set DevicePolicy to closed in unit file
* Mon Nov 25 2019 Marek Tamaskovic <mtamasko@redhat.com> - 0.7.4-4
- usbguard prevented from writing conf via dontaudit rule
- add match-all keyword
Resolves: rhbz#1804713
Resolves: rhbz#1789923
* Tue May 21 2019 Daniel Kopeček <dkopecek@redhat.com> - 0.7.4-3
- spec: make the check phase conditional
* Sun Jun 14 2020 Adrian Reber <adrian@lisas.de> - 0.7.8-2
- Rebuilt for protobuf 3.12
* Fri Dec 14 2018 Jiri Vymazal <jvymazal@redhat.com> - 0.7.4-2
Resolves: rhbz#1643057 - usbguard fails to report invalid value in IPCAccessControlFiles directive
* Tue May 19 2020 Radovan Sroka <rsroka@redhat.com> - 0.7.8-1
- rebase usbguard to 0.7.8
* Wed Jul 11 2018 Daniel Kopeček <dkopecek@redhat.com> - 0.7.4-1
- rebase usbguard-selinux to 0.0.3
- Update to 0.7.4
- added rules.d/ directory
- Replaced asciidoctor dependency with asciidoc
Resolves: rhbz#1808527
- Disabled Qt applet
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.6-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Dec 19 2019 Orion Poplawski <orion@nwra.com> - 0.7.6-7
- Rebuild for protobuf 3.11
* Wed Dec 18 2019 Radovan Sroka <rsroka@redhat.com> - 0.7.6-6
- fix selinux problems
* Mon Dec 02 2019 Radovan Sroka <rsroka@redhat.com> - 0.7.6-5
- obsolete applet-qt subpackage
* Mon Nov 25 2019 Attila Lakatos <alakatos@redhat.com> - 0.7.6-4
- added patch for libqb related permission issues
resolves: rhbz#1776357
- added patch to ensure that usbguard-daemons is still running after locked screen
resolves: rhbz#1751861
- added patch to fix permanent device policy changes
* Wed Nov 13 2019 Radovan Sroka <rsroka@redhat.com> - 0.7.6-3
- fixed typo in specfile
- usbguard.conf was generated incorrectly
* Wed Nov 13 2019 Radovan Sroka <rsroka@redhat.com> - 0.7.6-2
- added selinux subpackage
* Mon Nov 11 2019 Radovan Sroka <rsroka@redhat.com> - 0.7.6-1
- rebase to 0.7.6
- removed usbguard-applet subpackage which is not in upstream anymore
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Wed Nov 21 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.7.2-6
- Rebuild for protobuf 3.6
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Apr 05 2018 Daniel Kopeček <dkopecek@redhat.com> - 0.7.2-4
- Update to latest PEGTL API
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.2-3
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild