From: Adam Osuchowski Date: Thu, 13 Sep 2018 21:31:54 +0000 (+0200) Subject: - fix detect pie executable files X-Git-Tag: auto/th/file-5.35-1~1 X-Git-Url: http://git.pld-linux.org/?a=commitdiff_plain;h=69be43e3be868e7cc03e0dff9c24f412d5584431;p=packages%2Ffile.git - fix detect pie executable files - rel 3 --- 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; 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