[file] fix detection of ASCII text files with setuid, setgid, or sticky bits
Jan Kaluža
jkaluza at fedoraproject.org
Wed Jan 18 07:36:55 UTC 2012
commit 9b688974759163eccc02267c04028a7732df3099
Author: Jan Kaluza <hanzz.k at gmail.com>
Date: Wed Jan 18 08:32:25 2012 +0100
fix detection of ASCII text files with setuid, setgid, or sticky bits
file-5.10-sticky-bit.patch | 12 ++++++++++++
file.spec | 7 ++++++-
2 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/file-5.10-sticky-bit.patch b/file-5.10-sticky-bit.patch
new file mode 100644
index 0000000..de11829
--- /dev/null
+++ b/file-5.10-sticky-bit.patch
@@ -0,0 +1,12 @@
+diff --git a/src/ascmagic.c b/src/ascmagic.c
+index 5a1caac..8d6ca95 100644
+--- a/src/ascmagic.c
++++ b/src/ascmagic.c
+@@ -211,6 +211,7 @@ file_ascmagic_with_encoding(struct magic_set *ms, const unsigned char *buf,
+ case 0:
+ if (file_printf(ms, ", ") == -1)
+ goto done;
++ break;
+ case -1:
+ goto done;
+ default:
diff --git a/file.spec b/file.spec
index 7cf300a..c07a3bf 100644
--- a/file.spec
+++ b/file.spec
@@ -5,7 +5,7 @@
Summary: A utility for determining file types
Name: file
Version: 5.10
-Release: 4%{?dist}
+Release: 5%{?dist}
License: BSD
Group: Applications/File
Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
@@ -14,6 +14,7 @@ Patch0: file-localmagic.patch
# sent upstream
Patch1: file-tnef.patch
Patch2: file-5.10-strength.patch
+Patch3: file-5.10-sticky-bit.patch
URL: http://www.darwinsys.com/file/
Requires: file-libs = %{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -70,6 +71,7 @@ file(1) command.
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_
touch -r doc/libmagic.man doc/libmagic.man_
@@ -154,6 +156,9 @@ rm -rf $RPM_BUILD_ROOT
%endif
%changelog
+* Wed Jan 18 2012 Jan Kaluza <jkaluza at redhat.com> - 5.10-5
+- fix detection of ASCII text files with setuid, setgid, or sticky bits
+
* Tue Jan 10 2012 Jan Kaluza <jkaluza at redhat.com> - 5.10-4
- fix #772651 - decrease strength of newly added "C source" patterns
More information about the scm-commits
mailing list