diff --git a/backport-libselinux-restorecon-avoid-printing-NULL-pointer.patch b/backport-libselinux-restorecon-avoid-printing-NULL-pointer.patch deleted file mode 100644 index 6016b9e4e6a2e565df1d0df95d2d894e4a812e4a..0000000000000000000000000000000000000000 --- a/backport-libselinux-restorecon-avoid-printing-NULL-pointer.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 956bda08f6183078f13b70f6aa27d0529a3ec20a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= -Date: Tue, 7 Jun 2022 19:00:35 +0200 -Subject: [PATCH] libselinux: restorecon: avoid printing NULL pointer -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The variable `curcon` is NULL in case the file has no current security -context. Most C standard libraries handle it fine, avoid it nonetheless -for standard conformance. - -Signed-off-by: Christian Göttsche -Acked-by: Nicolas Iooss ---- - src/selinux_restorecon.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/selinux_restorecon.c b/src/selinux_restorecon.c -index 66e6a4a2..2d24559f 100644 ---- a/src/selinux_restorecon.c -+++ b/src/selinux_restorecon.c -@@ -744,7 +744,9 @@ static int restorecon_sb(const char *pathname, const struct stat *sb, - selinux_log(SELINUX_INFO, - "%s %s from %s to %s\n", - updated ? "Relabeled" : "Would relabel", -- pathname, curcon, newcon); -+ pathname, -+ curcon ? curcon : "", -+ newcon); - - if (flags->syslog_changes && !flags->nochange) { - if (curcon) --- -2.27.0 - diff --git a/libselinux-3.4.tar.gz b/libselinux-3.4.tar.gz deleted file mode 100644 index 487d79aa79e276b53f80ab5ff1009adf31989b9e..0000000000000000000000000000000000000000 Binary files a/libselinux-3.4.tar.gz and /dev/null differ diff --git a/libselinux-3.5.tar.gz b/libselinux-3.5.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..2916882feaee3b67e9b8cdead4e046847b3032fa Binary files /dev/null and b/libselinux-3.5.tar.gz differ diff --git a/libselinux.spec b/libselinux.spec index baa653a0061a047635cddbf85a656d1c66f8440d..c8dfcf82231ffac7a8dd038c5351f9bc2cf36de2 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -1,20 +1,18 @@ %global ruby_inc %(pkg-config --cflags ruby) -%global libsepol_version 3.4 +%global libsepol_version 3.5 Name: libselinux -Version: 3.4 +Version: 3.5 Release: 1 License: Public Domain Summary: SELinux library and simple utilities Url: https://github.com/SELinuxProject/selinux/wiki Source0: https://github.com/SELinuxProject/selinux/releases/download/%{version}/libselinux-%{version}.tar.gz -Patch6000: backport-libselinux-restorecon-avoid-printing-NULL-pointer.patch - Patch9000: do-malloc-trim-after-load-policy.patch BuildRequires: gcc python3-devel systemd swig pcre2-devel xz-devel -BuildRequires: ruby-devel libsepol-static +BuildRequires: ruby-devel libsepol-static python3-pip Requires: libsepol >= %{libsepol_version} pcre2 Conflicts: filesystem < 3, selinux-policy-base < 3.13.1-138 @@ -102,7 +100,7 @@ mv %{buildroot}%{_sbindir}/getconlist %{buildroot}%{_sbindir}/selinuxconlist %license LICENSE %{_libdir}/libselinux.so.* %{_sbindir}/{selabel_lookup_best_match,selabel_partial_match,selinux_check_access} -%{_sbindir}/{avcstat,getenforce,getsebool,matchpathcon,sefcontext_compile,selinuxconlist} +%{_sbindir}/{avcstat,getenforce,getpidprevcon,getsebool,matchpathcon,sefcontext_compile,selinuxconlist} %{_sbindir}/{selinuxdefcon,selinuxexeccon,selinuxenabled,setenforce,selabel_digest,selabel_lookup} %{_sbindir}/{selabel_get_digests_all_partial_matches,validatetrans} %dir %{_rundir}/setrans/ @@ -116,7 +114,7 @@ mv %{buildroot}%{_sbindir}/getconlist %{buildroot}%{_sbindir}/selinuxconlist %files -n python3-libselinux %{python3_sitearch}/selinux/ -%{python3_sitearch}/selinux-%{version}-* +%{python3_sitearch}/selinux-%{version}* %{python3_sitearch}/_selinux.*.so %files ruby @@ -130,6 +128,9 @@ mv %{buildroot}%{_sbindir}/getconlist %{buildroot}%{_sbindir}/selinuxconlist %{_mandir}/ru/man8/* %changelog +* Mon Jul 17 2023 zhangguangzhi - 3.5-1 +- update version to 3.5 + * Mon Jan 30 2023 zhangguangzhi - 3.4-1 - update version to 3.4