rpms/file/devel file-5.04-core-prpsinfo.patch, NONE, 1.1 file.spec, 1.126, 1.127
Jan Kaluža
jkaluza at fedoraproject.org
Mon Jul 19 15:30:25 UTC 2010
Author: jkaluza
Update of /cvs/pkgs/rpms/file/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv21133
Modified Files:
file.spec
Added Files:
file-5.04-core-prpsinfo.patch
Log Message:
* Thu Jul 19 2010 Jan Kaluza <jkaluza at redhat.com> 5.04-12
- fix #599695 - try to get "from" attribute for ELF binaries
only from core dumps.
file-5.04-core-prpsinfo.patch:
elfclass.h | 1 +
readelf.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
--- NEW FILE file-5.04-core-prpsinfo.patch ---
diff --git a/src/elfclass.h b/src/elfclass.h
index 27817d0..7f3da86 100644
--- a/src/elfclass.h
+++ b/src/elfclass.h
@@ -35,6 +35,7 @@
switch (type) {
#ifdef ELFCORE
case ET_CORE:
+ flags |= FLAGS_IS_CORE;
if (dophn_core(ms, clazz, swap, fd,
(off_t)elf_getu(swap, elfhdr.e_phoff),
elf_getu16(swap, elfhdr.e_phnum),
diff --git a/src/readelf.c b/src/readelf.c
index 5915569..24aa28c 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -286,6 +286,7 @@ private const char os_style_names[][8] = {
#define FLAGS_DID_CORE 1
#define FLAGS_DID_NOTE 2
#define FLAGS_DID_CORE_STYLE 4
+#define FLAGS_IS_CORE 8
private int
dophn_core(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
@@ -676,7 +677,7 @@ core:
break;
default:
- if (xnh_type == NT_PRPSINFO) {
+ if (xnh_type == NT_PRPSINFO && *flags & FLAGS_IS_CORE) {
size_t i, j;
unsigned char c;
/*
Index: file.spec
===================================================================
RCS file: /cvs/pkgs/rpms/file/devel/file.spec,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -p -r1.126 -r1.127
--- file.spec 8 Jul 2010 12:32:42 -0000 1.126
+++ file.spec 19 Jul 2010 15:30:25 -0000 1.127
@@ -5,7 +5,7 @@
Summary: A utility for determining file types
Name: file
Version: 5.04
-Release: 11%{?dist}
+Release: 12%{?dist}
License: BSD
Group: Applications/File
Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
@@ -22,6 +22,7 @@ Patch8: file-5.04-core-trim.patch
Patch9: file-5.04-retval.patch
Patch10: file-5.04-html-regression.patch
Patch11: file-5.04-zmachine-magic-update.patch
+Patch12: file-5.04-core-prpsinfo.patch
Requires: file-libs = %{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -96,6 +97,8 @@ file(1) command.
%patch10 -p1
#fixes #608922
%patch11 -p1
+#fixes #599695
+%patch12 -p1
iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_
touch -r doc/libmagic.man doc/libmagic.man_
@@ -173,6 +176,10 @@ rm -rf $RPM_BUILD_ROOT
%endif
%changelog
+* Thu Jul 19 2010 Jan Kaluza <jkaluza at redhat.com> 5.04-12
+- fix #599695 - try to get "from" attribute for ELF binaries
+ only from core dumps.
+
* Thu Jul 08 2010 Jan Kaluza <jkaluza at redhat.com> 5.04-11
- added docs for file-libs
More information about the scm-commits
mailing list