[packages/file] - fix detect pie executable files - rel 3

adwol adwol at pld-linux.org
Thu Sep 13 23:32:20 CEST 2018


commit 69be43e3be868e7cc03e0dff9c24f412d5584431
Author: Adam Osuchowski <adwol at pld-linux.org>
Date:   Thu Sep 13 23:31:54 2018 +0200

    - fix detect pie executable files
    - rel 3

 file-pie-so.patch | 12 ++++++++++++
 file.spec         |  4 +++-
 2 files changed, 15 insertions(+), 1 deletion(-)
---
diff --git a/file.spec b/file.spec
index 98130f8..9bac1eb 100644
--- a/file.spec
+++ b/file.spec
@@ -30,7 +30,7 @@ Summary(zh_CN.UTF-8):	判定文件类型的工具。
 Summary(zh_TW.UTF-8):	用於決定檔案類型的一個工具程式。
 Name:		file
 Version:	5.34
-Release:	2
+Release:	3
 License:	distributable
 Group:		Applications/File
 Source0:	ftp://ftp.astron.com/pub/file/%{name}-%{version}.tar.gz
@@ -44,6 +44,7 @@ Patch0:		%{name}-selinux.patch
 Patch1:		searchpath.patch
 Patch2:		automake.patch
 Patch4:		name-use-count.patch
+Patch5:		%{name}-pie-so.patch
 URL:		http://www.darwinsys.com/file/
 BuildRequires:	autoconf >= 2.50
 BuildRequires:	automake
@@ -273,6 +274,7 @@ Wiązania Pythona 3 do biblioteki libmagic.
 %patch1 -p1
 %patch2 -p1
 %patch4 -p1
+%patch5 -p1
 
 %if "%{cc_version}" < "3.4"
 %{__sed} -i -e 's,-Wextra,,' configure.ac
diff --git a/file-pie-so.patch b/file-pie-so.patch
new file mode 100644
index 0000000..62cf8c3
--- /dev/null
+++ b/file-pie-so.patch
@@ -0,0 +1,12 @@
+diff -ruNp file-5.34.orig/src/readelf.c file-5.34/src/readelf.c
+--- file-5.34.orig/src/readelf.c	2018-07-09 16:24:36.000000000 +0200
++++ file-5.34/src/readelf.c	2018-09-13 23:26:17.906332501 +0200
+@@ -1062,7 +1062,7 @@ dodynamic(struct magic_set *ms, void *vb
+ 
+ 	switch (xdh_tag) {
+ 	case DT_FLAGS_1:
+-		if (xdh_val == DF_1_PIE)
++		if (xdh_val & DF_1_PIE)
+ 			ms->mode |= 0111;
+ 		else
+ 			ms->mode &= ~0111;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/file.git/commitdiff/69be43e3be868e7cc03e0dff9c24f412d5584431



More information about the pld-cvs-commit mailing list