From 75cfa0f249e7fbc651a771f3f33acdf3ea3431a0 Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Nov 22 2016 16:10:41 +0000 Subject: libselinux-2.5-13 - Fix pointer handling in realpath_not_final (#1376598) --- diff --git a/libselinux-fedora.patch b/libselinux-fedora.patch index 2aa9e47..e3b2094 100644 --- a/libselinux-fedora.patch +++ b/libselinux-fedora.patch @@ -1656,7 +1656,7 @@ index 1d3b28a..ea6d70b 100644 char * ccontext = NULL; int err = errno; diff --git libselinux-2.5/src/matchpathcon.c libselinux-2.5/src/matchpathcon.c -index 5b495a0..a2f2c3e 100644 +index 5b495a0..d92ed79 100644 --- libselinux-2.5/src/matchpathcon.c +++ libselinux-2.5/src/matchpathcon.c @@ -2,6 +2,7 @@ @@ -1676,7 +1676,20 @@ index 5b495a0..a2f2c3e 100644 va_end(ap); } -@@ -470,6 +471,17 @@ int selinux_file_context_verify(const char *path, mode_t mode) +@@ -361,12 +362,6 @@ int realpath_not_final(const char *name, char *resolved_path) + goto out; + } + +- /* strip leading // */ +- while (tmp_path[len] && tmp_path[len] == '/' && +- tmp_path[len+1] && tmp_path[len+1] == '/') { +- tmp_path++; +- len++; +- } + last_component = strrchr(tmp_path, '/'); + + if (last_component == tmp_path) { +@@ -470,6 +465,17 @@ int selinux_file_context_verify(const char *path, mode_t mode) char * con = NULL; char * fcontext = NULL; int rc = 0; diff --git a/libselinux.spec b/libselinux.spec index fbccaea..7186fba 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -9,7 +9,7 @@ Summary: SELinux library and simple utilities Name: libselinux Version: 2.5 -Release: 12%{?dist} +Release: 13%{?dist} License: Public Domain Group: System Environment/Libraries # https://github.com/SELinuxProject/selinux/wiki/Releases @@ -20,7 +20,7 @@ Url: https://github.com/SELinuxProject/selinux/wiki # download https://raw.githubusercontent.com/fedora-selinux/scripts/master/selinux/make-fedora-selinux-patch.sh # run: # $ VERSION=2.5 ./make-fedora-selinux-patch.sh libselinux -# HEAD https://github.com/fedora-selinux/selinux/commit/caefad506ca46db441952ab64ebfc6202897516b +# HEAD https://github.com/fedora-selinux/selinux/commit/be955a4daf0598dbce8881c5dbab23b0cb1a6322 Patch1: libselinux-fedora.patch BuildRequires: pkgconfig python python-devel ruby-devel ruby libsepol-static >= %{libsepolver} swig pcre-devel xz-devel %if 0%{?with_python3} @@ -256,6 +256,9 @@ rm -rf %{buildroot} %{ruby_vendorarchdir}/selinux.so %changelog +* Tue Nov 22 2016 Petr Lautrbach - 2.5-13 +- Fix pointer handling in realpath_not_final (#1376598) + * Mon Oct 03 2016 Petr Lautrbach 2.5-12 - Fix -Wsign-compare warnings - Drop unused stdio_ext.h header file