Compare commits
43 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3a58aca9e | ||
|
|
d0db16e236 | ||
|
|
9dc2db7571 | ||
|
|
d8c5d46563 | ||
|
|
4678a49347 | ||
|
|
f7c30b9e6b | ||
|
|
7f57f2807a | ||
|
|
1da2d8dacd | ||
|
|
4125b6a0ad | ||
|
|
5d01f96eab | ||
|
|
f1ffa26556 | ||
|
|
5fe2cc1565 | ||
|
|
13ea59fa5a | ||
|
|
5015f2bbcb | ||
|
|
b0c20efcc0 | ||
|
|
5aa21e5bdc | ||
|
|
b38cc691db | ||
|
|
97ffebda96 | ||
|
|
301862791b | ||
|
|
6763ed0496 | ||
|
|
a7b34bb53f | ||
|
|
ca389b9dcd | ||
|
|
0ae94a6ee8 | ||
|
|
1c3f2c8ee7 |
||
|
|
2eb6b48d69 |
||
|
|
80738463b0 | ||
|
|
44200f7461 | ||
|
|
0574b88f18 |
||
|
|
2a01830eea |
||
|
|
05697feceb | ||
|
|
5a02b5043f | ||
| 72f58ad748 | |||
|
|
5d6d902090 | ||
|
|
ee065e6f69 |
||
|
|
d41c0811d4 | ||
|
|
100a7d4dbb |
||
|
|
89b4a43921 | ||
|
|
4f397875d0 |
||
|
|
95d53e17ef |
||
|
|
44f50872ec | ||
|
|
d327155d9f |
||
|
|
a1fb6977df |
||
|
|
bd6d626064 |
11 changed files with 250 additions and 229 deletions
10
.gitignore
vendored
10
.gitignore
vendored
|
|
@ -15,3 +15,13 @@
|
|||
/usbguard-0.7.6.tar.gz
|
||||
/usbguard-selinux-0.0.1.tar.gz
|
||||
/usbguard-selinux-0.0.2.tar.gz
|
||||
/usbguard-0.7.7.tar.gz
|
||||
/usbguard-selinux-0.0.3.tar.gz
|
||||
/usbguard-0.7.8.tar.gz
|
||||
/usbguard-selinux-0.0.4.tar.gz
|
||||
/usbguard-1.0.0.tar.gz
|
||||
/usbguard-1.1.0.tar.gz
|
||||
/usbguard-1.1.2.tar.gz
|
||||
/usbguard-1.1.3.tar.gz
|
||||
/usbguard-selinux-0.0.5.tar.gz
|
||||
/usbguard-1.1.4.tar.gz
|
||||
|
|
|
|||
14
selinux-bin-sbin.patch
Normal file
14
selinux-bin-sbin.patch
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
diff --git a/usbguard.fc b/usbguard.fc
|
||||
index d8cfa45..3904962 100644
|
||||
--- a/usbguard.fc
|
||||
+++ b/usbguard.fc
|
||||
@@ -18,7 +18,9 @@
|
||||
/etc/usbguard/rules\.conf -- gen_context(system_u:object_r:usbguard_rules_t,s0)
|
||||
/etc/usbguard(/.*)? gen_context(system_u:object_r:usbguard_conf_t,s0)
|
||||
/usr/lib/systemd/system/usbguard.* -- gen_context(system_u:object_r:usbguard_unit_file_t,s0)
|
||||
+/usr/bin/usbguard-daemon -- gen_context(system_u:object_r:usbguard_exec_t,s0)
|
||||
/usr/sbin/usbguard-daemon -- gen_context(system_u:object_r:usbguard_exec_t,s0)
|
||||
+/usr/bin/usbguard-dbus -- gen_context(system_u:object_r:usbguard_exec_t,s0)
|
||||
/usr/sbin/usbguard-dbus -- gen_context(system_u:object_r:usbguard_exec_t,s0)
|
||||
/var/log/usbguard(/.*)? gen_context(system_u:object_r:usbguard_log_t,s0)
|
||||
/run/usbguard.* -- gen_context(system_u:object_r:usbguard_var_run_t,s0)
|
||||
14
selinux-homed.patch
Normal file
14
selinux-homed.patch
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
diff --git a/usbguard.te b/usbguard.te
|
||||
index 52d0090..f8e55bc 100644
|
||||
--- a/usbguard.te
|
||||
+++ b/usbguard.te
|
||||
@@ -133,3 +133,9 @@ ifdef(`systemd_userdbd_stream_connect',`
|
||||
systemd_userdbd_stream_connect(usbguard_t)
|
||||
')
|
||||
')
|
||||
+
|
||||
+ifdef(`systemd_homed_stream_connect',`
|
||||
+ optional_policy(`
|
||||
+ systemd_homed_stream_connect(usbguard_t)
|
||||
+ ')
|
||||
+')
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
diff -up ./usbguard-selinux-0.0.2/usbguard.te.selinux ./usbguard-selinux-0.0.2/usbguard.te
|
||||
--- ./usbguard-selinux-0.0.2/usbguard.te.selinux 2019-11-13 07:08:17.000000000 -0500
|
||||
+++ ./usbguard-selinux-0.0.2/usbguard.te 2019-12-18 11:21:36.725889798 -0500
|
||||
@@ -41,15 +41,18 @@ gen_tunable(usbguard_daemon_write_rules,
|
||||
type usbguard_t;
|
||||
type usbguard_exec_t;
|
||||
init_daemon_domain(usbguard_t, usbguard_exec_t)
|
||||
+init_nnp_daemon_domain(usbguard_t)
|
||||
|
||||
type usbguard_unit_file_t;
|
||||
systemd_unit_file(usbguard_unit_file_t)
|
||||
|
||||
type usbguard_conf_t;
|
||||
files_config_file(usbguard_conf_t)
|
||||
+systemd_mount_dir(usbguard_conf_t)
|
||||
|
||||
type usbguard_log_t;
|
||||
logging_log_file(usbguard_log_t)
|
||||
+systemd_mount_dir(usbguard_log_t)
|
||||
|
||||
type usbguard_rules_t;
|
||||
files_config_file(usbguard_rules_t)
|
||||
@@ -84,7 +87,8 @@ manage_files_pattern(usbguard_t, usbguar
|
||||
files_pid_filetrans(usbguard_t, usbguard_var_run_t, file)
|
||||
|
||||
manage_files_pattern(usbguard_t, usbguard_tmpfs_t, usbguard_tmpfs_t)
|
||||
-fs_tmpfs_filetrans(usbguard_t, usbguard_tmpfs_t, file)
|
||||
+fs_tmpfs_filetrans(usbguard_t, usbguard_tmpfs_t, { file dir })
|
||||
+manage_dirs_pattern(usbguard_t, usbguard_tmpfs_t, usbguard_tmpfs_t)
|
||||
allow usbguard_t usbguard_tmpfs_t:file map;
|
||||
|
||||
manage_files_pattern(usbguard_t, usbguard_log_t, usbguard_log_t)
|
||||
4
sources
4
sources
|
|
@ -1,2 +1,2 @@
|
|||
SHA512 (usbguard-0.7.6.tar.gz) = 0b0d42276e48baac2dc1f9031eec25e3f622a8d6178cb0400b97c7d32005bfa158b60fd286fdc66206a8684658fefaf6389ef93511e942f025e75671d7455628
|
||||
SHA512 (usbguard-selinux-0.0.2.tar.gz) = b0e88b8c7022c2fd8874af5f5c70342e9c27093f15c56a058e24c6515775d4de3d347a7a6d3b32e20fba6be347439ae7438176c9e1ceebf06a5f372697a2aeec
|
||||
SHA512 (usbguard-1.1.4.tar.gz) = d4f588ff97cb9529d9f8c7664998fbfc55fc6e5ddeaad8da3a7e4703e5de0c1b74871763d46ef558458258bbda71bbb47ebc9b4daf67bd9a3d1da015ea48fe61
|
||||
SHA512 (usbguard-selinux-0.0.5.tar.gz) = 72b12e6a44dddfd863909f82e288170f935c4e941cb65678cd544fd0fa33ecce0a794c4b620dea9f496a45f2035d3b3b6dde662319db200eaff38e26999c4496
|
||||
|
|
|
|||
13
tests/tests.yml
Normal file
13
tests/tests.yml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
# Test to run in classic context
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-beakerlib
|
||||
tags:
|
||||
- classic
|
||||
repositories:
|
||||
- repo: "https://github.com/RedHat-SP-Security/tests"
|
||||
dest: "tests"
|
||||
fmf_filter: "component: usbguard"
|
||||
required_packages:
|
||||
- beakerlib-libraries
|
||||
|
|
@ -1,118 +0,0 @@
|
|||
diff -up usbguard-0.7.6/src/Library/IPCServerPrivate.cpp.orig usbguard-0.7.6/src/Library/IPCServerPrivate.cpp
|
||||
--- usbguard-0.7.6/src/Library/IPCServerPrivate.cpp.orig 2019-11-25 12:11:49.632373175 +0100
|
||||
+++ usbguard-0.7.6/src/Library/IPCServerPrivate.cpp 2019-11-25 12:12:42.361781652 +0100
|
||||
@@ -242,6 +242,22 @@ namespace usbguard
|
||||
return stats->client_pid;
|
||||
}
|
||||
|
||||
+ void IPCServerPrivate::qbIPCConnectionAuthSet(qb_ipcs_connection_t* conn, uid_t uid, gid_t gid)
|
||||
+ {
|
||||
+ try {
|
||||
+ std::string path = conn->description;
|
||||
+ size_t last_slash = path.find_last_of("/");
|
||||
+ path = path.substr(0, last_slash);
|
||||
+ chown(path.c_str(), uid, gid);
|
||||
+ }
|
||||
+ catch (const std::exception& exception) {
|
||||
+ USBGUARD_LOG(Error) << "IPC connection chmod error. Exception: " << exception.what();
|
||||
+ }
|
||||
+ catch (...) {
|
||||
+ USBGUARD_LOG(Error) << "IPC connection error. Could not change mode bits.";
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
int32_t IPCServerPrivate::qbIPCConnectionAcceptFn(qb_ipcs_connection_t* conn, uid_t uid, gid_t gid)
|
||||
{
|
||||
try {
|
||||
@@ -259,6 +275,7 @@ namespace usbguard
|
||||
<< " gid=" << 0
|
||||
<< " mode=0660";
|
||||
qb_ipcs_connection_auth_set(conn, uid, 0, 0660);
|
||||
+ qbIPCConnectionAuthSet(conn, uid, 0);
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
diff -up usbguard-0.7.6/src/Library/IPCServerPrivate.hpp.orig usbguard-0.7.6/src/Library/IPCServerPrivate.hpp
|
||||
--- usbguard-0.7.6/src/Library/IPCServerPrivate.hpp.orig 2019-11-25 12:11:27.723203531 +0100
|
||||
+++ usbguard-0.7.6/src/Library/IPCServerPrivate.hpp 2019-11-25 12:13:04.635954202 +0100
|
||||
@@ -39,6 +39,71 @@
|
||||
#include <qb/qbipcs.h>
|
||||
#include <qb/qbloop.h>
|
||||
|
||||
+
|
||||
+/*libqb header starts*/
|
||||
+ #define CONNECTION_DESCRIPTION NAME_MAX
|
||||
+
|
||||
+ enum qb_ipcs_connection_state {
|
||||
+ QB_IPCS_CONNECTION_INACTIVE,
|
||||
+ QB_IPCS_CONNECTION_ACTIVE,
|
||||
+ QB_IPCS_CONNECTION_ESTABLISHED,
|
||||
+ QB_IPCS_CONNECTION_SHUTTING_DOWN,
|
||||
+ };
|
||||
+
|
||||
+ struct qb_ipcs_connection_auth {
|
||||
+ uid_t uid;
|
||||
+ gid_t gid;
|
||||
+ mode_t mode;
|
||||
+ };
|
||||
+
|
||||
+ struct qb_ringbuffer_s;
|
||||
+ typedef struct qb_ringbuffer_s qb_ringbuffer_t;
|
||||
+
|
||||
+ struct qb_ipc_one_way {
|
||||
+ size_t max_msg_size;
|
||||
+ enum qb_ipc_type type;
|
||||
+ union {
|
||||
+ struct {
|
||||
+ int32_t sock;
|
||||
+ char *sock_name;
|
||||
+ void* shared_data;
|
||||
+ char shared_file_name[NAME_MAX];
|
||||
+ } us;
|
||||
+ struct {
|
||||
+ qb_ringbuffer_t *rb;
|
||||
+ } shm;
|
||||
+ } u;
|
||||
+ };
|
||||
+
|
||||
+ struct qb_list_head {
|
||||
+ struct qb_list_head *next;
|
||||
+ struct qb_list_head *prev;
|
||||
+ };
|
||||
+
|
||||
+
|
||||
+ struct qb_ipcs_connection {
|
||||
+ enum qb_ipcs_connection_state state;
|
||||
+ int32_t refcount;
|
||||
+ pid_t pid;
|
||||
+ uid_t euid;
|
||||
+ gid_t egid;
|
||||
+ struct qb_ipcs_connection_auth auth;
|
||||
+ struct qb_ipc_one_way setup;
|
||||
+ struct qb_ipc_one_way request;
|
||||
+ struct qb_ipc_one_way response;
|
||||
+ struct qb_ipc_one_way event;
|
||||
+ struct qb_ipcs_service *service;
|
||||
+ struct qb_list_head list;
|
||||
+ struct qb_ipc_request_header *receive_buf;
|
||||
+ void *context;
|
||||
+ int32_t fc_enabled;
|
||||
+ int32_t poll_events;
|
||||
+ int32_t outstanding_notifiers;
|
||||
+ char description[CONNECTION_DESCRIPTION];
|
||||
+ struct qb_ipcs_connection_stats_2 stats;
|
||||
+ };
|
||||
+/*libqb header ends*/
|
||||
+
|
||||
namespace usbguard
|
||||
{
|
||||
class IPCServerPrivate
|
||||
@@ -107,6 +172,8 @@ namespace usbguard
|
||||
bool qbIPCConnectionAllowed(uid_t uid, gid_t gid, IPCServer::AccessControl* const ac_ptr) const;
|
||||
bool authenticateIPCConnectionDAC(uid_t uid, gid_t gid, IPCServer::AccessControl* const ac_ptr = nullptr) const;
|
||||
|
||||
+ static void qbIPCConnectionAuthSet(qb_ipcs_connection_t* connection, uid_t uid, gid_t gid);
|
||||
+
|
||||
bool matchACLByUID(uid_t uid, IPCServer::AccessControl* const ac_ptr) const;
|
||||
bool matchACLByGID(gid_t gid, IPCServer::AccessControl* const ac_ptr) const;
|
||||
bool matchACLByName(uid_t uid, gid_t gid, IPCServer::AccessControl* const ac_ptr) const;
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
diff -up usbguard-0.7.6/usbguard.service.in.orig usbguard-0.7.6/usbguard.service.in
|
||||
--- usbguard-0.7.6/usbguard.service.in.orig 2019-11-25 17:02:34.518355971 +0100
|
||||
+++ usbguard-0.7.6/usbguard.service.in 2019-11-25 17:04:38.753066258 +0100
|
||||
@@ -21,7 +21,7 @@ ProtectKernelModules=yes
|
||||
ProtectSystem=yes
|
||||
PIDFile=/run/usbguard.pid
|
||||
ReadOnlyPaths=-/
|
||||
-ReadWritePaths=-/dev/shm -%localstatedir%/log/usbguard -/tmp
|
||||
+ReadWritePaths=-/dev/shm -%localstatedir%/log/usbguard -/tmp -%sysconfdir%/usbguard/
|
||||
Restart=on-failure
|
||||
RestrictAddressFamilies=AF_UNIX AF_NETLINK
|
||||
RestrictNamespaces=yes
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
diff -up usbguard-0.7.6/src/Daemon/Daemon.cpp.orig usbguard-0.7.6/src/Daemon/Daemon.cpp
|
||||
--- usbguard-0.7.6/src/Daemon/Daemon.cpp.orig 2019-11-25 15:45:50.869913293 +0100
|
||||
+++ usbguard-0.7.6/src/Daemon/Daemon.cpp 2019-11-25 15:47:37.722735108 +0100
|
||||
@@ -507,8 +507,14 @@ namespace usbguard
|
||||
const int signal_num = sigwaitinfo(&signal_set, &signal_info);
|
||||
|
||||
if (signal_num <= 0) {
|
||||
- USBGUARD_LOG(Error) << "sigwaitinfo failed: errno=" << errno << "; Shutting down.";
|
||||
- break;
|
||||
+ if (errno == EINTR) {
|
||||
+ USBGUARD_LOG(Info) << "sigwaitinfo interrupted: [EINTR]. Ignoring.";
|
||||
+ continue;
|
||||
+ }
|
||||
+ else {
|
||||
+ USBGUARD_LOG(Error) << "sigwaitinfo failed: errno=" << errno << "; Shutting down.";
|
||||
+ throw Exception("Daemon::run", "sigwaitinfo", "failed");
|
||||
+ }
|
||||
}
|
||||
|
||||
switch (signal_num) {
|
||||
@@ -523,8 +529,11 @@ namespace usbguard
|
||||
exit_loop = false;
|
||||
break;
|
||||
|
||||
+
|
||||
+ /* should not be reachable */
|
||||
default:
|
||||
USBGUARD_LOG(Warning) << "Received signal " << signal_num << ". Ignoring!";
|
||||
+ continue;
|
||||
}
|
||||
}
|
||||
while (!exit_loop);
|
||||
|
|
@ -9,6 +9,19 @@
|
|||
#
|
||||
RuleFile=/etc/usbguard/rules.conf
|
||||
|
||||
#
|
||||
# Rule set folder path.
|
||||
#
|
||||
# The USBGuard daemon will use this folder to load the policy
|
||||
# rule set from it and to write new rules received via the
|
||||
# IPC interface.
|
||||
#
|
||||
# RuleFolder=/path/to/rulesfolder/
|
||||
#
|
||||
|
||||
RuleFolder=/etc/usbguard/rules.d/
|
||||
|
||||
|
||||
#
|
||||
# Implicit policy target.
|
||||
#
|
||||
|
|
@ -171,3 +184,8 @@ AuditBackend=FileAudit
|
|||
#
|
||||
AuditFilePath=/var/log/usbguard/usbguard-audit.log
|
||||
|
||||
#
|
||||
# Hides personally identifiable information such as device serial numbers and
|
||||
# hashes of descriptors (which include the serial number) from audit entries.
|
||||
#
|
||||
HidePII=false
|
||||
|
|
|
|||
212
usbguard.spec
212
usbguard.spec
|
|
@ -1,17 +1,17 @@
|
|||
%global selinuxtype targeted
|
||||
%global moduletype contrib
|
||||
%define semodule_version 0.0.2
|
||||
%define semodule_version 0.0.5
|
||||
|
||||
Name: usbguard
|
||||
Version: 0.7.6
|
||||
Release: 8%{?dist}
|
||||
Version: 1.1.4
|
||||
Release: 6%{?dist}
|
||||
Summary: A tool for implementing USB device usage policy
|
||||
License: GPLv2+
|
||||
License: GPL-2.0-or-later
|
||||
## Not installed
|
||||
# src/ThirdParty/Catch: Boost Software License - Version 1.0
|
||||
URL: https://usbguard.github.io/
|
||||
Source0: https://github.com/USBGuard/usbguard/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
|
||||
Source1: https://github.com/USBGuard/usbguard/releases/download/%{name}-selinux-%{semodule_version}/%{name}-selinux-%{semodule_version}.tar.gz
|
||||
Source1: https://github.com/USBGuard/usbguard-selinux/archive/refs/tags/v%{semodule_version}.tar.gz#/%{name}-selinux-%{semodule_version}.tar.gz
|
||||
Source2: usbguard-daemon.conf
|
||||
|
||||
Requires: systemd
|
||||
|
|
@ -20,17 +20,18 @@ Requires(preun): systemd
|
|||
Requires(postun): systemd
|
||||
Requires(post): /sbin/ldconfig
|
||||
Requires(postun): /sbin/ldconfig
|
||||
Recommends: %{name}-selinux
|
||||
|
||||
Requires: (%{name}-selinux if selinux-policy-%{selinuxtype})
|
||||
Obsoletes: %{name}-applet-qt < 0.7.6
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libqb-devel
|
||||
BuildRequires: libgcrypt-devel
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: libstdc++-devel
|
||||
BuildRequires: protobuf-devel protobuf-compiler
|
||||
BuildRequires: PEGTL-static
|
||||
BuildRequires: catch1-devel
|
||||
BuildRequires: autoconf automake libtool
|
||||
BuildRequires: bash-completion
|
||||
BuildRequires: asciidoc
|
||||
|
|
@ -38,18 +39,8 @@ BuildRequires: audit-libs-devel
|
|||
# For `pkg-config systemd` only
|
||||
BuildRequires: systemd
|
||||
|
||||
# dbus
|
||||
BuildRequires: dbus-glib-devel
|
||||
BuildRequires: dbus-devel
|
||||
BuildRequires: glib2-devel
|
||||
BuildRequires: polkit-devel
|
||||
BuildRequires: libxslt
|
||||
BuildRequires: libxml2
|
||||
|
||||
Patch1: usbguard-0.7.6-libqb.patch
|
||||
Patch2: usbguard-0.7.6-sigwaitinfo.patch
|
||||
Patch3: usbguard-0.7.6-servicefile.patch
|
||||
Patch4: selinux.patch
|
||||
Patch0: selinux-bin-sbin.patch
|
||||
Patch1: selinux-homed.patch
|
||||
|
||||
%description
|
||||
The USBGuard software framework helps to protect your computer against rogue USB
|
||||
|
|
@ -74,11 +65,15 @@ Requires: %{name} = %{version}-%{release}
|
|||
The %{name}-tools package contains optional tools from the USBGuard
|
||||
software framework.
|
||||
|
||||
|
||||
# dbus
|
||||
%package dbus
|
||||
Summary: USBGuard D-Bus Service
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
BuildRequires: dbus-devel
|
||||
BuildRequires: glib2-devel
|
||||
BuildRequires: polkit-devel
|
||||
BuildRequires: libxslt
|
||||
BuildRequires: libxml2
|
||||
Requires: dbus
|
||||
Requires: polkit
|
||||
|
||||
|
|
@ -90,7 +85,8 @@ a D-Bus interface to the USBGuard daemon component.
|
|||
Summary: USBGuard selinux
|
||||
Group: Applications/System
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
BuildRequires: selinux-policy
|
||||
Requires: selinux-policy-%{selinuxtype}
|
||||
Requires(post): selinux-policy-%{selinuxtype}
|
||||
BuildRequires: selinux-policy-devel
|
||||
BuildArch: noarch
|
||||
%{?selinux_requires}
|
||||
|
|
@ -106,14 +102,14 @@ daemon.
|
|||
# selinux
|
||||
%setup -q -D -T -a 1
|
||||
|
||||
pushd %{name}-selinux-%{semodule_version}
|
||||
%patch -P 0 -p1
|
||||
%patch -P 1 -p1
|
||||
popd
|
||||
|
||||
# Remove bundled library sources before build
|
||||
rm -rf src/ThirdParty/{Catch,PEGTL}
|
||||
|
||||
%patch1 -p1 -b .libqb
|
||||
%patch2 -p1 -b .sigwaitinfo
|
||||
%patch3 -p1 -b .servicefile
|
||||
%patch4 -p1 -b .selinux
|
||||
|
||||
%build
|
||||
mkdir -p ./m4
|
||||
autoreconf -i -v --no-recursive ./
|
||||
|
|
@ -124,7 +120,8 @@ autoreconf -i -v --no-recursive ./
|
|||
--enable-systemd \
|
||||
--with-dbus \
|
||||
--with-polkit \
|
||||
--with-crypto-library=gcrypt
|
||||
--with-crypto-library=openssl \
|
||||
--disable-catch
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
|
|
@ -133,9 +130,6 @@ pushd %{name}-selinux-%{semodule_version}
|
|||
make
|
||||
popd
|
||||
|
||||
%check
|
||||
make check
|
||||
|
||||
# selinux
|
||||
%pre selinux
|
||||
%selinux_relabel_pre -s %{selinuxtype}
|
||||
|
|
@ -145,6 +139,7 @@ make install INSTALL='install -p' DESTDIR=%{buildroot}
|
|||
|
||||
# Overwrite configuration with distribution defaults
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/usbguard
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/usbguard/rules.d
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/usbguard/IPCAccessControl.d
|
||||
install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/usbguard/usbguard-daemon.conf
|
||||
|
||||
|
|
@ -176,6 +171,7 @@ find %{buildroot} \( -name '*.la' -o -name '*.a' \) -exec rm -f {} ';'
|
|||
%{_bindir}/usbguard
|
||||
%dir %{_localstatedir}/log/usbguard
|
||||
%dir %{_sysconfdir}/usbguard
|
||||
%dir %{_sysconfdir}/usbguard/rules.d/
|
||||
%dir %{_sysconfdir}/usbguard/IPCAccessControl.d
|
||||
%config(noreplace) %attr(0600,-,-) %{_sysconfdir}/usbguard/usbguard-daemon.conf
|
||||
%config(noreplace) %attr(0600,-,-) %{_sysconfdir}/usbguard/rules.conf
|
||||
|
|
@ -185,6 +181,7 @@ find %{buildroot} \( -name '*.la' -o -name '*.a' \) -exec rm -f {} ';'
|
|||
%{_datadir}/man/man5/usbguard-rules.conf.5.gz
|
||||
%{_datadir}/man/man1/usbguard.1.gz
|
||||
%{_datadir}/bash-completion/completions/usbguard
|
||||
%attr(640,root,root) %{_tmpfilesdir}/usbguard.conf
|
||||
|
||||
%files devel
|
||||
%{_includedir}/*
|
||||
|
|
@ -214,7 +211,7 @@ find %{buildroot} \( -name '*.la' -o -name '*.a' \) -exec rm -f {} ';'
|
|||
|
||||
%files selinux
|
||||
%{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.bz2
|
||||
%ghost %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{name}
|
||||
%ghost %verify(not md5 size mode mtime) %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{name}
|
||||
%{_datadir}/selinux/devel/include/%{moduletype}/ipp-%{name}.if
|
||||
|
||||
%post selinux
|
||||
|
|
@ -229,8 +226,157 @@ fi
|
|||
%selinux_relabel_post -s %{selinuxtype}
|
||||
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.4-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
|
||||
|
||||
* Wed Jun 24 2026 Benjamin A. Beasley <code@musicinmybrain.net> - 1.1.4-5
|
||||
- Rebuilt for abseil-cpp 20260526.0
|
||||
|
||||
* Mon Jun 22 2026 Yaakov Selkowitz <yselkowi@redhat.com> - 1.1.4-4
|
||||
- Rebuilt for openssl 4.0
|
||||
|
||||
* Wed Jun 10 2026 Yaakov Selkowitz <yselkowi@redhat.com> - 1.1.4-3
|
||||
- Use openssl for crypto
|
||||
|
||||
* Fri May 29 2026 Miroslav Suchy <msuchy@redhat.com> - 1.1.4-2
|
||||
- rebuild for https://fedoraproject.org/wiki/Changes/Protobuf_5.x/6.x
|
||||
|
||||
* Wed Apr 15 2026 Attila Lakatos <alakatos@redhat.com> - 1.1.4-1
|
||||
- Rebase to 1.1.4
|
||||
- Drop patches merged upstream: tmpfiles-v1, tmpfiles-v2,
|
||||
uninstall-ignore-error, ipc-privileges, protobuf-3.0,
|
||||
catch2-support, disable-catch
|
||||
- Add SELinux policy fix for systemd-homed stream connect
|
||||
Resolves: rhbz#2380396
|
||||
Resolves: rhbz#2376283
|
||||
|
||||
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
|
||||
|
||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Thu Apr 24 2025 Attila Lakatos <alakatos@redhat.com> - 1.1.3-5
|
||||
- Fix usbguard-tmpfiles.conf
|
||||
- Remove catch1 dependency
|
||||
- Adapt for protobuf api changes
|
||||
- Fix regression in specifying IPC privileges using UID
|
||||
- selinux subpackage update: unified bin and sbin
|
||||
Resolves: rhbz#2297169
|
||||
|
||||
* Thu Feb 06 2025 Attila Lakatos <alakatos@redhat.com> - 1.1.3-4
|
||||
- Install usbguard-tmpfles.conf
|
||||
|
||||
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Fri Jun 07 2024 Attila Lakatos <alakatos@redhat.com> - 1.1.3-1
|
||||
- Rebase to 1.1.3
|
||||
Resolves: rhbz#2290724
|
||||
- selinux package policy update
|
||||
Resolves: rhbz#2271330
|
||||
|
||||
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Thu Jul 27 2023 Attila Lakatos <alakatos@redhat.com> - 1.1.2-1
|
||||
- Rebase to 1.1.2
|
||||
Resolves: rhbz#2064543
|
||||
|
||||
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Wed May 10 2023 Tomas Popela <tpopela@redhat.com> - 1.1.0-7
|
||||
- Drop BR on dbus-glib as the requirement was dropped in 0.7.7
|
||||
|
||||
* Mon Feb 20 2023 Attila Lakatos <alakatos@redhat.com> - 1.1.0-6
|
||||
- Rebuild
|
||||
Resolves: rhbz#2171749
|
||||
|
||||
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Tue Mar 29 2022 Radovan Sroka <rsroka@redhat.com> - 1.1.0-3
|
||||
- usbguard requires selinux subpackage
|
||||
- this ensures that the selinux package and all its dependencies are
|
||||
not pulled into containers and other systems that do not use SELinux
|
||||
|
||||
* Tue Mar 15 2022 Radovan Sroka <rsroka@redhat.com> - 1.1.0-2
|
||||
- selinux: allow policykit dbus comunnication
|
||||
- restore support for access control filenames without a group
|
||||
|
||||
* Thu Mar 03 2022 Radovan Sroka <rsroka@redhat.com> - 1.1.0-1
|
||||
- rebase to 1.1.0
|
||||
Resolves: rhbz#2058450
|
||||
- fixed CVE-2019-25058 usbguard: Fix unauthorized access via D-Bus
|
||||
Resolves: rhbz#2058466
|
||||
|
||||
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Sat Nov 06 2021 Adrian Reber <adrian@lisas.de> - 1.0.0-8
|
||||
- Rebuilt for protobuf 3.19.0
|
||||
|
||||
* Mon Oct 25 2021 Adrian Reber <adrian@lisas.de> - 1.0.0-7
|
||||
- Rebuilt for protobuf 3.18.1
|
||||
|
||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Wed Mar 31 2021 Jonathan Wakely <jwakely@redhat.com> - 1.0.0-5
|
||||
- Rebuilt for removed libstdc++ symbols (#1937698)
|
||||
|
||||
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.0.0-4
|
||||
- Rebuilt for updated systemd-rpm-macros
|
||||
See https://pagure.io/fesco/issue/2583.
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Sat Jan 16 12:49:32 CET 2021 Adrian Reber <adrian@lisas.de> - 1.0.0-2
|
||||
- Rebuilt for protobuf 3.14
|
||||
|
||||
* Thu Jan 14 2021 Zoltan Fridrich <zfridric@redhat.com> - 1.0.0-1
|
||||
- rebase usbguard to 1.0.0
|
||||
- added support for rules covering combination of classes
|
||||
- fix usbguard being killed
|
||||
Resolves: rhbz#1916039
|
||||
Resolves: rhbz#1861330
|
||||
Resolves: rhbz#1905257
|
||||
|
||||
* Wed Jan 13 14:43:57 CET 2021 Adrian Reber <adrian@lisas.de> - 0.7.8-6
|
||||
- Rebuilt for protobuf 3.14
|
||||
|
||||
* Thu Sep 24 2020 Adrian Reber <adrian@lisas.de> - 0.7.8-5
|
||||
- Rebuilt for protobuf 3.13
|
||||
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.8-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Wed Jun 24 2020 Radovan Sroka <rsroka@redhat.com> - 0.7.8-3
|
||||
- rebase selinux tarball to v0.0.4
|
||||
- enable forking style in unit file
|
||||
- set DevicePolicy to closed in unit file
|
||||
- usbguard prevented from writing conf via dontaudit rule
|
||||
Resolves: rhbz#1804713
|
||||
Resolves: rhbz#1789923
|
||||
|
||||
* Sun Jun 14 2020 Adrian Reber <adrian@lisas.de> - 0.7.8-2
|
||||
- Rebuilt for protobuf 3.12
|
||||
|
||||
* Tue May 19 2020 Radovan Sroka <rsroka@redhat.com> - 0.7.8-1
|
||||
- rebase usbguard to 0.7.8
|
||||
- rebase usbguard-selinux to 0.0.3
|
||||
- added rules.d/ directory
|
||||
Resolves: rhbz#1808527
|
||||
|
||||
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.6-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue