libsemanage-3.4-0.rc2.1
- SELinux userspace 3.4-rc2 release
This commit is contained in:
parent
8608ca7c33
commit
465b588cae
1
.gitignore
vendored
1
.gitignore
vendored
@ -153,3 +153,4 @@ libsemanage-2.0.45.tgz
|
|||||||
/libsemanage-3.3-rc3.tar.gz
|
/libsemanage-3.3-rc3.tar.gz
|
||||||
/libsemanage-3.3.tar.gz
|
/libsemanage-3.3.tar.gz
|
||||||
/libsemanage-3.4-rc1.tar.gz
|
/libsemanage-3.4-rc1.tar.gz
|
||||||
|
/libsemanage-3.4-rc2.tar.gz
|
||||||
|
@ -1,53 +0,0 @@
|
|||||||
From 966cda1fccc78c4c3d4f23bb4c211a09393f30fb Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
|
|
||||||
Date: Fri, 8 Apr 2022 15:10:54 +0200
|
|
||||||
Subject: [PATCH] libsemanage: avoid double fclose
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
Content-type: text/plain
|
|
||||||
|
|
||||||
The cleanup goto block in `semanage_direct_set_enabled()` closes the
|
|
||||||
file stream pointer fp if not NULL. Set the stream to NULL after a
|
|
||||||
manual fclose(3), even on failure.
|
|
||||||
|
|
||||||
direct_api.c: In function ‘semanage_direct_set_enabled’:
|
|
||||||
direct_api.c:2130:25: error: pointer ‘fp’ may be used after ‘fclose’ [-Werror=use-after-free]
|
|
||||||
2130 | if (fp != NULL) fclose(fp);
|
|
||||||
| ^~~~~~~~~~
|
|
||||||
direct_api.c:2092:29: note: call to ‘fclose’ here
|
|
||||||
2092 | if (fclose(fp) != 0) {
|
|
||||||
| ^~~~~~~~~~
|
|
||||||
|
|
||||||
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
|
|
||||||
---
|
|
||||||
libsemanage/src/direct_api.c | 6 +++---
|
|
||||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libsemanage/src/direct_api.c b/libsemanage/src/direct_api.c
|
|
||||||
index d5716ce579e9..7206483a3ebb 100644
|
|
||||||
--- a/libsemanage/src/direct_api.c
|
|
||||||
+++ b/libsemanage/src/direct_api.c
|
|
||||||
@@ -2089,7 +2089,9 @@ static int semanage_direct_set_enabled(semanage_handle_t *sh,
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (fclose(fp) != 0) {
|
|
||||||
+ ret = fclose(fp);
|
|
||||||
+ fp = NULL;
|
|
||||||
+ if (ret != 0) {
|
|
||||||
ERR(sh,
|
|
||||||
"Unable to close disabled file for module %s",
|
|
||||||
modkey->name);
|
|
||||||
@@ -2097,8 +2099,6 @@ static int semanage_direct_set_enabled(semanage_handle_t *sh,
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
- fp = NULL;
|
|
||||||
-
|
|
||||||
break;
|
|
||||||
case 1: /* enable the module */
|
|
||||||
if (unlink(fn) < 0) {
|
|
||||||
--
|
|
||||||
2.35.1
|
|
||||||
|
|
@ -4,13 +4,12 @@
|
|||||||
Summary: SELinux binary policy manipulation library
|
Summary: SELinux binary policy manipulation library
|
||||||
Name: libsemanage
|
Name: libsemanage
|
||||||
Version: 3.4
|
Version: 3.4
|
||||||
Release: 0.rc1.1%{?dist}
|
Release: 0.rc2.1%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Source0: https://github.com/SELinuxProject/selinux/releases/download/3.4-rc1/libsemanage-3.4-rc1.tar.gz
|
Source0: https://github.com/SELinuxProject/selinux/releases/download/3.4-rc2/libsemanage-3.4-rc2.tar.gz
|
||||||
# fedora-selinux/selinux: git format-patch -N 3.4-rc1 -- libsemanage
|
# fedora-selinux/selinux: git format-patch -N 3.4-rc2 -- libsemanage
|
||||||
# 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
|
||||||
# Patch list start
|
# Patch list start
|
||||||
Patch0001: 0001-libsemanage-avoid-double-fclose.patch
|
|
||||||
# Patch list end
|
# Patch list end
|
||||||
URL: https://github.com/SELinuxProject/selinux/wiki
|
URL: https://github.com/SELinuxProject/selinux/wiki
|
||||||
Source1: semanage.conf
|
Source1: semanage.conf
|
||||||
@ -75,7 +74,7 @@ The libsemanage-python3 package contains the python 3 bindings for developing
|
|||||||
SELinux management applications.
|
SELinux management applications.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n libsemanage-%{version}-rc1 -p 2
|
%autosetup -n libsemanage-%{version}-rc2 -p 2
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -154,6 +153,9 @@ cp %{SOURCE1} ${RPM_BUILD_ROOT}%{_sysconfdir}/selinux/semanage.conf
|
|||||||
%{_libexecdir}/selinux/semanage_migrate_store
|
%{_libexecdir}/selinux/semanage_migrate_store
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Apr 21 2022 Petr Lautrbach <plautrba@redhat.com> - 3.4-0.rc2.1
|
||||||
|
- SELinux userspace 3.4-rc2 release
|
||||||
|
|
||||||
* Wed Apr 13 2022 Petr Lautrbach <plautrba@redhat.com> - 3.4-0.rc1.1
|
* Wed Apr 13 2022 Petr Lautrbach <plautrba@redhat.com> - 3.4-0.rc1.1
|
||||||
- SELinux userspace 3.4-rc1 release
|
- SELinux userspace 3.4-rc1 release
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (libsemanage-3.4-rc1.tar.gz) = 65bcb569981bc45b5520829e7df79bd6de75cd1877b75233727aa89484b123c730fd4dca4f297cf85616597632ec3c4be36b6cca1178811ac8cc0d45465954ca
|
SHA512 (libsemanage-3.4-rc2.tar.gz) = 8dcd8c5db768f1b01fe3aefbab37b94b4facc22c39bf1695c4c1f64c2226315b7f0800092d5f0fd83d17e476e6833e7dbb200999eb911ace71c794f55b62aec1
|
||||||
|
Loading…
Reference in New Issue
Block a user