diff --git a/libsemanage-fedora.patch b/libsemanage-fedora.patch index f96dce8..199f383 100644 --- a/libsemanage-fedora.patch +++ b/libsemanage-fedora.patch @@ -1,3 +1,56 @@ +diff --git libsemanage-2.8/src/direct_api.c libsemanage-2.8/src/direct_api.c +index c58961b..8e4d116 100644 +--- libsemanage-2.8/src/direct_api.c ++++ libsemanage-2.8/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); +@@ -2177,7 +2177,6 @@ cleanup: + semanage_module_info_destroy(sh, modinfo); + free(modinfo); + +- if (fp != NULL) fclose(fp); + return status; + } + +@@ -2342,16 +2341,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, +@@ -2395,7 +2384,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; + } + diff --git libsemanage-2.8/src/semanage_store.c libsemanage-2.8/src/semanage_store.c index f1984c5..58dded6 100644 --- libsemanage-2.8/src/semanage_store.c diff --git a/libsemanage.spec b/libsemanage.spec index 4d6b038..75723e4 100644 --- a/libsemanage.spec +++ b/libsemanage.spec @@ -1,16 +1,16 @@ -%define libsepolver 2.8-1 -%define libselinuxver 2.8-1 +%define libsepolver 2.8-3 +%define libselinuxver 2.8-5 Summary: SELinux binary policy manipulation library Name: libsemanage Version: 2.8 -Release: 5%{?dist} +Release: 6%{?dist} License: LGPLv2+ Source: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20180524/libsemanage-2.8.tar.gz # download https://raw.githubusercontent.com/fedora-selinux/scripts/master/selinux/make-fedora-selinux-patch.sh # run: # $ VERSION=2.8 ./make-fedora-selinux-patch.sh libsemanage -# HEAD https://github.com/fedora-selinux/selinux/commit/23336180581f2ea967f7b3999969013e5917718c +# HEAD https://github.com/fedora-selinux/selinux/commit/decd49caec76a87817686f84716503151cf2be5d Patch1: libsemanage-fedora.patch URL: https://github.com/SELinuxProject/selinux/wiki Source1: semanage.conf @@ -179,6 +179,9 @@ sed -i '1s%\(#! */usr/bin/python\)\([^3].*\|\)$%\13\2%' %{buildroot}%{_libexecdi %{_libexecdir}/selinux/semanage_migrate_store %changelog +* Tue Nov 13 2018 Petr Lautrbach - 2.8-6 +- Fix RESOURCE_LEAK and USE_AFTER_FREE coverity scan defects + * Mon Sep 17 2018 Petr Lautrbach - 2.8-5 - Include user name in ROLE_REMOVE audit events