SELinux userspace 3.2-rc1 release
https://lore.kernel.org/selinux/87a6t36bpp.fsf@redhat.com/T/#u
This commit is contained in:
parent
90403a710e
commit
ee689c2b4b
1
.gitignore
vendored
1
.gitignore
vendored
@ -146,3 +146,4 @@ libsemanage-2.0.45.tgz
|
|||||||
/libsemanage-3.0-rc1.tar.gz
|
/libsemanage-3.0-rc1.tar.gz
|
||||||
/libsemanage-3.0.tar.gz
|
/libsemanage-3.0.tar.gz
|
||||||
/libsemanage-3.1.tar.gz
|
/libsemanage-3.1.tar.gz
|
||||||
|
/libsemanage-3.2-rc1.tar.gz
|
||||||
|
@ -1,100 +0,0 @@
|
|||||||
From c08b73d7183e2dbab0ba43c3df32f4214abbc9c6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Petr Lautrbach <plautrba@redhat.com>
|
|
||||||
Date: Fri, 9 Oct 2020 15:00:51 +0200
|
|
||||||
Subject: [PATCH] libsemanage: Drop deprecated functions
|
|
||||||
|
|
||||||
semanage_module_enable() and semanage_module_disable() were deprecated
|
|
||||||
by commit 9fbc6d14418f ("libsemanage: add back original module
|
|
||||||
enable/disable functions for ABI compatability") in 2014 in order to
|
|
||||||
preserve ABI compatibility. As we the libsemanage ABI is changed by the
|
|
||||||
previous commit, it makes sense to drop them completely.
|
|
||||||
|
|
||||||
Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
|
|
||||||
---
|
|
||||||
libsemanage/src/libsemanage.map | 2 --
|
|
||||||
libsemanage/src/modules.c | 56 ---------------------------------
|
|
||||||
2 files changed, 58 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libsemanage/src/libsemanage.map b/libsemanage/src/libsemanage.map
|
|
||||||
index 4bec06aaae27..3ea7b60f97bb 100644
|
|
||||||
--- a/libsemanage/src/libsemanage.map
|
|
||||||
+++ b/libsemanage/src/libsemanage.map
|
|
||||||
@@ -165,8 +165,6 @@ LIBSEMANAGE_1.0 {
|
|
||||||
semanage_is_connected;
|
|
||||||
semanage_is_managed;
|
|
||||||
semanage_mls_enabled;
|
|
||||||
- semanage_module_disable;
|
|
||||||
- semanage_module_enable;
|
|
||||||
semanage_module_get_name;
|
|
||||||
semanage_module_get_version;
|
|
||||||
semanage_module_info_datum_destroy;
|
|
||||||
diff --git a/libsemanage/src/modules.c b/libsemanage/src/modules.c
|
|
||||||
index 8b36801038df..b6dd456cac32 100644
|
|
||||||
--- a/libsemanage/src/modules.c
|
|
||||||
+++ b/libsemanage/src/modules.c
|
|
||||||
@@ -734,62 +734,6 @@ int semanage_module_set_enabled(semanage_handle_t *sh,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
-/* This function exists only for ABI compatibility. It has been deprecated and
|
|
||||||
- * should not be used. Instead, use semanage_module_set_enabled() */
|
|
||||||
-int semanage_module_enable(semanage_handle_t *sh, char *module_name)
|
|
||||||
-{
|
|
||||||
- int rc = -1;
|
|
||||||
- semanage_module_key_t *modkey = NULL;
|
|
||||||
-
|
|
||||||
- rc = semanage_module_key_create(sh, &modkey);
|
|
||||||
- if (rc != 0)
|
|
||||||
- goto exit;
|
|
||||||
-
|
|
||||||
- rc = semanage_module_key_set_name(sh, modkey, module_name);
|
|
||||||
- if (rc != 0)
|
|
||||||
- goto exit;
|
|
||||||
-
|
|
||||||
- rc = semanage_module_set_enabled(sh, modkey, 1);
|
|
||||||
- if (rc != 0)
|
|
||||||
- goto exit;
|
|
||||||
-
|
|
||||||
- rc = 0;
|
|
||||||
-
|
|
||||||
-exit:
|
|
||||||
- semanage_module_key_destroy(sh, modkey);
|
|
||||||
- free(modkey);
|
|
||||||
-
|
|
||||||
- return rc;
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-/* This function exists only for ABI compatibility. It has been deprecated and
|
|
||||||
- * should not be used. Instead, use semanage_module_set_enabled() */
|
|
||||||
-int semanage_module_disable(semanage_handle_t *sh, char *module_name)
|
|
||||||
-{
|
|
||||||
- int rc = -1;
|
|
||||||
- semanage_module_key_t *modkey = NULL;
|
|
||||||
-
|
|
||||||
- rc = semanage_module_key_create(sh, &modkey);
|
|
||||||
- if (rc != 0)
|
|
||||||
- goto exit;
|
|
||||||
-
|
|
||||||
- rc = semanage_module_key_set_name(sh, modkey, module_name);
|
|
||||||
- if (rc != 0)
|
|
||||||
- goto exit;
|
|
||||||
-
|
|
||||||
- rc = semanage_module_set_enabled(sh, modkey, 0);
|
|
||||||
- if (rc != 0)
|
|
||||||
- goto exit;
|
|
||||||
-
|
|
||||||
- rc = 0;
|
|
||||||
-
|
|
||||||
-exit:
|
|
||||||
- semanage_module_key_destroy(sh, modkey);
|
|
||||||
- free(modkey);
|
|
||||||
-
|
|
||||||
- return rc;
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
/* Converts a string to a priority
|
|
||||||
*
|
|
||||||
* returns -1 if str is not a valid priority.
|
|
||||||
--
|
|
||||||
2.29.0
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
|||||||
From 6ebb35d261eaa8701b53b9f68184b05de8dfd868 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Petr Lautrbach <plautrba@redhat.com>
|
|
||||||
Date: Fri, 9 Oct 2020 15:00:52 +0200
|
|
||||||
Subject: [PATCH] libsemanage: Bump libsemanage.so version
|
|
||||||
|
|
||||||
Previous commits removed some symbols and broke ABI, therefore we need to change
|
|
||||||
SONAME.
|
|
||||||
|
|
||||||
See the following quotes from distribution guidelines:
|
|
||||||
|
|
||||||
https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#run-time-shared-libraries
|
|
||||||
|
|
||||||
Every time the shared library ABI changes in a way that may break
|
|
||||||
binaries linked against older versions of the shared library, the SONAME
|
|
||||||
of the library and the corresponding name for the binary package
|
|
||||||
containing the runtime shared library should change.
|
|
||||||
|
|
||||||
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_downstream_so_name_versioning
|
|
||||||
|
|
||||||
When new versions of the library are released, you should use an ABI
|
|
||||||
comparison tool to check for ABI differences in the built shared
|
|
||||||
libraries. If it detects any incompatibilities, bump the n number by
|
|
||||||
one.
|
|
||||||
|
|
||||||
Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
|
|
||||||
---
|
|
||||||
libsemanage/src/Makefile | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/libsemanage/src/Makefile b/libsemanage/src/Makefile
|
|
||||||
index a0eb3747d74b..ab6cae51f5c3 100644
|
|
||||||
--- a/libsemanage/src/Makefile
|
|
||||||
+++ b/libsemanage/src/Makefile
|
|
||||||
@@ -32,7 +32,7 @@ YACC = bison
|
|
||||||
YFLAGS = -d
|
|
||||||
|
|
||||||
VERSION = $(shell cat ../VERSION)
|
|
||||||
-LIBVERSION = 1
|
|
||||||
+LIBVERSION = 2
|
|
||||||
|
|
||||||
LIBA=libsemanage.a
|
|
||||||
TARGET=libsemanage.so
|
|
||||||
--
|
|
||||||
2.29.0
|
|
||||||
|
|
@ -1,66 +0,0 @@
|
|||||||
From fc966a746653cc15a14d1e1a80f01fc2f567ee08 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Petr Lautrbach <plautrba@redhat.com>
|
|
||||||
Date: Wed, 7 Nov 2018 18:17:34 +0100
|
|
||||||
Subject: [PATCH] libsemanage: Fix RESOURCE_LEAK and USE_AFTER_FREE coverity
|
|
||||||
scan defects
|
|
||||||
|
|
||||||
---
|
|
||||||
libsemanage/src/direct_api.c | 21 ++++++++-------------
|
|
||||||
1 file changed, 8 insertions(+), 13 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libsemanage/src/direct_api.c b/libsemanage/src/direct_api.c
|
|
||||||
index d2b91fb24292..f445cd4d6fb5 100644
|
|
||||||
--- a/libsemanage/src/direct_api.c
|
|
||||||
+++ b/libsemanage/src/direct_api.c
|
|
||||||
@@ -1028,7 +1028,7 @@ static int semanage_direct_write_langext(semanage_handle_t *sh,
|
|
||||||
|
|
||||||
fp = NULL;
|
|
||||||
|
|
||||||
- ret = 0;
|
|
||||||
+ return 0;
|
|
||||||
|
|
||||||
cleanup:
|
|
||||||
if (fp != NULL) fclose(fp);
|
|
||||||
@@ -2184,7 +2184,6 @@ cleanup:
|
|
||||||
semanage_module_info_destroy(sh, modinfo);
|
|
||||||
free(modinfo);
|
|
||||||
|
|
||||||
- if (fp != NULL) fclose(fp);
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -2349,16 +2348,6 @@ static int semanage_direct_get_module_info(semanage_handle_t *sh,
|
|
||||||
free(tmp);
|
|
||||||
tmp = NULL;
|
|
||||||
|
|
||||||
- if (fclose(fp) != 0) {
|
|
||||||
- ERR(sh,
|
|
||||||
- "Unable to close %s module lang ext file.",
|
|
||||||
- (*modinfo)->name);
|
|
||||||
- status = -1;
|
|
||||||
- goto cleanup;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- fp = NULL;
|
|
||||||
-
|
|
||||||
/* lookup enabled/disabled status */
|
|
||||||
ret = semanage_module_get_path(sh,
|
|
||||||
*modinfo,
|
|
||||||
@@ -2402,7 +2391,13 @@ cleanup:
|
|
||||||
free(modinfos);
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (fp != NULL) fclose(fp);
|
|
||||||
+ if (fp != NULL && fclose(fp) != 0) {
|
|
||||||
+ ERR(sh,
|
|
||||||
+ "Unable to close %s module lang ext file.",
|
|
||||||
+ (*modinfo)->name);
|
|
||||||
+ status = -1;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.29.0
|
|
||||||
|
|
@ -1,19 +1,16 @@
|
|||||||
%define libsepolver 3.1-5
|
%define libsepolver 3.2-0.rc1
|
||||||
%define libselinuxver 3.1-5
|
%define libselinuxver 3.2-0.rc1
|
||||||
|
|
||||||
Summary: SELinux binary policy manipulation library
|
Summary: SELinux binary policy manipulation library
|
||||||
Name: libsemanage
|
Name: libsemanage
|
||||||
Version: 3.1
|
Version: 3.2
|
||||||
Release: 6%{?dist}
|
Release: 0.rc1.1%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Source0: https://github.com/SELinuxProject/selinux/releases/download/20200710/libsemanage-3.1.tar.gz
|
Source0: https://github.com/SELinuxProject/selinux/releases/download/3.2-rc1/libsemanage-3.2-rc1.tar.gz
|
||||||
# fedora-selinux/selinux: git format-patch -N libsemanage-3.1 -- libsemanage
|
# fedora-selinux/selinux: git format-patch -N libsemanage-3.1 -- 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-Remove-legacy-and-duplicate-symbols.patch
|
Patch0001: 0004-libsemanage-Fix-RESOURCE_LEAK-and-USE_AFTER_FREE-cov.patch
|
||||||
Patch0002: 0002-libsemanage-Drop-deprecated-functions.patch
|
|
||||||
Patch0003: 0003-libsemanage-Bump-libsemanage.so-version.patch
|
|
||||||
Patch0004: 0004-libsemanage-Fix-RESOURCE_LEAK-and-USE_AFTER_FREE-cov.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
|
||||||
@ -78,7 +75,7 @@ The libsemanage-python3 package contains the python 3 bindings for developing
|
|||||||
SELinux management applications.
|
SELinux management applications.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n libsemanage-%{version} -p 2
|
%autosetup -n libsemanage-%{version}-rc1 -p 2
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -157,6 +154,9 @@ cp %{SOURCE1} ${RPM_BUILD_ROOT}%{_sysconfdir}/selinux/semanage.conf
|
|||||||
%{_libexecdir}/selinux/semanage_migrate_store
|
%{_libexecdir}/selinux/semanage_migrate_store
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jan 20 2021 Petr Lautrbach <plautrba@redhat.com> - 3.2-0.rc1.1
|
||||||
|
- SELinux userspace 3.2-rc1 release
|
||||||
|
|
||||||
* Fri Dec 18 2020 Petr Lautrbach <plautrba@redhat.com> - 3.1-6
|
* Fri Dec 18 2020 Petr Lautrbach <plautrba@redhat.com> - 3.1-6
|
||||||
- Drop "genhomedircon: check usepasswd" patch
|
- Drop "genhomedircon: check usepasswd" patch
|
||||||
- genhomedircon to ignore
|
- genhomedircon to ignore
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (libsemanage-3.1.tar.gz) = 8609ca7d13b5c603677740f2b14558fea3922624af182d20d618237ba11fcf2559fab82fc68d1efa6ff118f064d426f005138521652c761de92cd66150102197
|
SHA512 (libsemanage-3.2-rc1.tar.gz) = 854758bc10944c994c2cc5a2dd0ce036f273e258a66ce419324348f22a2040a7fce7bcda6e9a8d185e4c8671bd7b4723f1b537738ea392b6cb9e5246fcd655db
|
||||||
|
Loading…
Reference in New Issue
Block a user