libselinux-2.5-13

- Fix pointer handling in realpath_not_final (#1376598)
This commit is contained in:
Petr Lautrbach 2016-11-22 17:10:41 +01:00
parent 5ad771ed68
commit 75cfa0f249
2 changed files with 20 additions and 4 deletions

View File

@ -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;

View File

@ -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 <plautrba@redhat.com> - 2.5-13
- Fix pointer handling in realpath_not_final (#1376598)
* Mon Oct 03 2016 Petr Lautrbach <plautrba@redhat.com> 2.5-12
- Fix -Wsign-compare warnings
- Drop unused stdio_ext.h header file