import libsemanage-2.9-2.el8
This commit is contained in:
parent
232820698b
commit
30479ab4e2
@ -0,0 +1,48 @@
|
|||||||
|
From d68976d353bf334c43fd084f9cc4535874860006 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Vit Mojzis <vmojzis@redhat.com>
|
||||||
|
Date: Tue, 8 Oct 2019 14:22:12 +0200
|
||||||
|
Subject: [PATCH] libsemanage: Add support for DCCP and SCTP protocols
|
||||||
|
|
||||||
|
This is necessary for "semanage port" to be able to handle DCCP and SCTP
|
||||||
|
protocols.
|
||||||
|
|
||||||
|
Fixes:
|
||||||
|
"port_parse" only handles TCP and UDP protocols
|
||||||
|
|
||||||
|
Signed-off-by: Vit Mojzis <vmojzis@redhat.com>
|
||||||
|
---
|
||||||
|
libsemanage/include/semanage/port_record.h | 2 ++
|
||||||
|
libsemanage/src/ports_file.c | 4 ++++
|
||||||
|
2 files changed, 6 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/libsemanage/include/semanage/port_record.h b/libsemanage/include/semanage/port_record.h
|
||||||
|
index 20ae4bd9..71074800 100644
|
||||||
|
--- a/libsemanage/include/semanage/port_record.h
|
||||||
|
+++ b/libsemanage/include/semanage/port_record.h
|
||||||
|
@@ -16,6 +16,8 @@ typedef struct semanage_port_key semanage_port_key_t;
|
||||||
|
|
||||||
|
#define SEMANAGE_PROTO_UDP 0
|
||||||
|
#define SEMANAGE_PROTO_TCP 1
|
||||||
|
+#define SEMANAGE_PROTO_DCCP 2
|
||||||
|
+#define SEMANAGE_PROTO_SCTP 3
|
||||||
|
|
||||||
|
/* Key */
|
||||||
|
extern int semanage_port_compare(const semanage_port_t * port,
|
||||||
|
diff --git a/libsemanage/src/ports_file.c b/libsemanage/src/ports_file.c
|
||||||
|
index 46ee2f00..4738d467 100644
|
||||||
|
--- a/libsemanage/src/ports_file.c
|
||||||
|
+++ b/libsemanage/src/ports_file.c
|
||||||
|
@@ -84,6 +84,10 @@ static int port_parse(semanage_handle_t * handle,
|
||||||
|
semanage_port_set_proto(port, SEMANAGE_PROTO_TCP);
|
||||||
|
else if (!strcasecmp(str, "udp"))
|
||||||
|
semanage_port_set_proto(port, SEMANAGE_PROTO_UDP);
|
||||||
|
+ else if (!strcasecmp(str, "dccp"))
|
||||||
|
+ semanage_port_set_proto(port, SEMANAGE_PROTO_DCCP);
|
||||||
|
+ else if (!strcasecmp(str, "sctp"))
|
||||||
|
+ semanage_port_set_proto(port, SEMANAGE_PROTO_SCTP);
|
||||||
|
else {
|
||||||
|
ERR(handle, "invalid protocol \"%s\" (%s: %u):\n%s", str,
|
||||||
|
info->filename, info->lineno, info->orig_line);
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
@ -4,11 +4,12 @@
|
|||||||
Summary: SELinux binary policy manipulation library
|
Summary: SELinux binary policy manipulation library
|
||||||
Name: libsemanage
|
Name: libsemanage
|
||||||
Version: 2.9
|
Version: 2.9
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Source0: https://github.com/SELinuxProject/selinux/releases/download/20190315/libsemanage-2.9.tar.gz
|
Source0: https://github.com/SELinuxProject/selinux/releases/download/20190315/libsemanage-2.9.tar.gz
|
||||||
# i=1; for j in 00*patch; do printf "Patch%04d: %s\n" $i $j; i=$((i+1));done
|
# i=1; for j in 00*patch; do printf "Patch%04d: %s\n" $i $j; i=$((i+1));done
|
||||||
Patch0001: 0001-libsemanage-Fix-RESOURCE_LEAK-and-USE_AFTER_FREE-cov.patch
|
Patch0001: 0001-libsemanage-Fix-RESOURCE_LEAK-and-USE_AFTER_FREE-cov.patch
|
||||||
|
Patch0002: 0002-libsemanage-Add-support-for-DCCP-and-SCTP-protocols.patch
|
||||||
URL: https://github.com/SELinuxProject/selinux/wiki
|
URL: https://github.com/SELinuxProject/selinux/wiki
|
||||||
Source1: semanage.conf
|
Source1: semanage.conf
|
||||||
|
|
||||||
@ -154,6 +155,9 @@ rm %{buildroot}%{_libexecdir}/selinux/semanage_migrate_store~
|
|||||||
%{_libexecdir}/selinux/semanage_migrate_store
|
%{_libexecdir}/selinux/semanage_migrate_store
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Nov 06 2019 Vit Mojzis <vmojzis@redhat.com> - 2.9-2
|
||||||
|
- Add support for DCCP and SCTP protocols (#1563742)
|
||||||
|
|
||||||
* Mon Mar 18 2019 Petr Lautrbach <plautrba@redhat.com> - 2.9-1
|
* Mon Mar 18 2019 Petr Lautrbach <plautrba@redhat.com> - 2.9-1
|
||||||
- SELinux userspace 2.9 release
|
- SELinux userspace 2.9 release
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user