From 09c83ba5813472fa644ee54b7039dd45f292bcaa Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Mon, 11 Mar 2019 16:21:56 +0100 Subject: [PATCH] SELinux userspace 2.9-rc2 release --- .gitignore | 1 + libsemanage-fedora.patch | 34 +++------------------------------- libsemanage.spec | 18 +++++++++++------- sources | 2 +- 4 files changed, 16 insertions(+), 39 deletions(-) diff --git a/.gitignore b/.gitignore index 1fb5b19..73919ca 100644 --- a/.gitignore +++ b/.gitignore @@ -141,3 +141,4 @@ libsemanage-2.0.45.tgz /libsemanage-2.8-rc3.tar.gz /libsemanage-2.8.tar.gz /libsemanage-2.9-rc1.tar.gz +/libsemanage-2.9-rc2.tar.gz diff --git a/libsemanage-fedora.patch b/libsemanage-fedora.patch index 9ec3d72..29b1d61 100644 --- a/libsemanage-fedora.patch +++ b/libsemanage-fedora.patch @@ -1,7 +1,7 @@ -diff --git libsemanage-2.9-rc1/src/direct_api.c libsemanage-2.9-rc1/src/direct_api.c +diff --git libsemanage-2.9-rc2/src/direct_api.c libsemanage-2.9-rc2/src/direct_api.c index c58961b..8e4d116 100644 ---- libsemanage-2.9-rc1/src/direct_api.c -+++ libsemanage-2.9-rc1/src/direct_api.c +--- libsemanage-2.9-rc2/src/direct_api.c ++++ libsemanage-2.9-rc2/src/direct_api.c @@ -1028,7 +1028,7 @@ static int semanage_direct_write_langext(semanage_handle_t *sh, fp = NULL; @@ -51,31 +51,3 @@ index c58961b..8e4d116 100644 return status; } -diff --git libsemanage-2.9-rc1/src/genhomedircon.c libsemanage-2.9-rc1/src/genhomedircon.c -index 591941f..ac37667 100644 ---- libsemanage-2.9-rc1/src/genhomedircon.c -+++ libsemanage-2.9-rc1/src/genhomedircon.c -@@ -1077,10 +1077,20 @@ static int get_group_users(genhomedircon_settings_t * s, - - const char *grname = selogin + 1; - -- if (getgrnam_r(grname, &grstorage, grbuf, -- (size_t) grbuflen, &group) != 0) { -- goto cleanup; -+ errno = 0; -+ while ( -+ (retval = getgrnam_r(grname, &grstorage, grbuf, (size_t) grbuflen, &group)) != 0 && -+ errno == ERANGE -+ ) { -+ char *new_grbuf; -+ grbuflen *= 2; -+ new_grbuf = realloc(grbuf, grbuflen); -+ if (new_grbuf == NULL) -+ goto cleanup; -+ grbuf = new_grbuf; - } -+ if (retval == -1) -+ goto cleanup; - - if (group == NULL) { - ERR(s->h_semanage, "Can't find group named %s\n", grname); diff --git a/libsemanage.spec b/libsemanage.spec index 9918722..b59e875 100644 --- a/libsemanage.spec +++ b/libsemanage.spec @@ -1,16 +1,16 @@ -%define libsepolver 2.9-0 -%define libselinuxver 2.9-0 +%define libsepolver 2.9-0.rc2 +%define libselinuxver 2.9-0.rc2 Summary: SELinux binary policy manipulation library Name: libsemanage Version: 2.9 -Release: 0.rc1.1%{?dist}.1 +Release: 0.rc2.1%{?dist} License: LGPLv2+ -Source0: https://github.com/SELinuxProject/selinux/releases/download/20190125/libsemanage-2.9-rc1.tar.gz +Source0: https://github.com/SELinuxProject/selinux/releases/download/20190301/libsemanage-2.9-rc2.tar.gz # download https://raw.githubusercontent.com/fedora-selinux/scripts/master/selinux/make-fedora-selinux-patch.sh # run: -# $ VERSION=2.9-rc1 ./make-fedora-selinux-patch.sh libsemanage -# HEAD https://github.com/fedora-selinux/selinux/commit/a69fe203e41c9493e13ffafa51908d17da6fa7a2 +# $ VERSION=2.9-rc2 ./make-fedora-selinux-patch.sh libsemanage +# HEAD https://github.com/fedora-selinux/selinux/commit/cb42e1bf324698875492f6f8f7adf9c5f7778aab Patch1: libsemanage-fedora.patch URL: https://github.com/SELinuxProject/selinux/wiki Source1: semanage.conf @@ -87,7 +87,7 @@ The libsemanage-python3 package contains the python 3 bindings for developing SELinux management applications. %prep -%autosetup -n libsemanage-%{version}-rc1 -p 1 +%autosetup -n libsemanage-%{version}-rc2 -p 1 %build @@ -152,6 +152,7 @@ sed -i '1s%\(#! */usr/bin/python\)\([^3].*\|\)$%\13\2%' %{buildroot}%{_libexecdi %config(noreplace) %{_sysconfdir}/selinux/semanage.conf %{_libdir}/libsemanage.so.1 %{_mandir}/man5/* +%{_mandir}/ru/man5/* %dir %{_libexecdir}/selinux %dir %{_sharedstatedir}/selinux %dir %{_sharedstatedir}/selinux/tmp @@ -179,6 +180,9 @@ sed -i '1s%\(#! */usr/bin/python\)\([^3].*\|\)$%\13\2%' %{buildroot}%{_libexecdi %{_libexecdir}/selinux/semanage_migrate_store %changelog +* Mon Mar 11 2019 Petr Lautrbach - 2.9-0.rc2.1 +- SELinux userspace 2.9-rc2 release + * Fri Feb 01 2019 Fedora Release Engineering - 2.9-0.rc1.1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index 3bcd7c0..dcb8de8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libsemanage-2.9-rc1.tar.gz) = ad17c450d32c50a65b09cdbde49a7a54708f3e50dc7f4fb1a90cd717448b5d4f7e231fd5742e5ee273b13dd07c702d69a724937c8147f74d271aceb7cd9f9748 +SHA512 (libsemanage-2.9-rc2.tar.gz) = 90ad869350dc4f0628a89cb4c22ac8f91def9bb87d893e7dfbfeb81a3a5ed81ee17b9ef0c5320d64d52d9c4e0e4f3938429937fa82d23d2c1e6b52ee658f48d4