]> git.pld-linux.org Git - packages/file.git/commitdiff
- fix detect pie executable files
authorAdam Osuchowski <adwol@pld-linux.org>
Thu, 13 Sep 2018 21:31:54 +0000 (23:31 +0200)
committerAdam Osuchowski <adwol@pld-linux.org>
Thu, 13 Sep 2018 21:31:54 +0000 (23:31 +0200)
- rel 3

file-pie-so.patch [new file with mode: 0644]
file.spec

diff --git a/file-pie-so.patch b/file-pie-so.patch
new file mode 100644 (file)
index 0000000..62cf8c3
--- /dev/null
@@ -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;
index 98130f8ae68c48f72d509e7085e429f90641ec35..9bac1ebd98eee93c59470d189103e5fadb166b2f 100644 (file)
--- 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
This page took 0.110427 seconds and 4 git commands to generate.