fix #771292 - do not show 'using regular magic file' warning for /etc/magic,
because this file is not supposed to be compiled
This commit is contained in:
parent
f66cec1e93
commit
5ad4a2e5f5
@ -41,6 +41,20 @@ index 39b1703..3dd92d8 100644
|
||||
lib_LTLIBRARIES = libmagic.la
|
||||
include_HEADERS = magic.h
|
||||
AM_CPPFLAGS = -DMAGIC='"$(MAGIC)"'
|
||||
diff --git a/src/apprentice.c b/src/apprentice.c
|
||||
index b330669..0490642 100644
|
||||
--- a/src/apprentice.c
|
||||
+++ b/src/apprentice.c
|
||||
@@ -281,7 +281,7 @@ apprentice_1(struct magic_set *ms, const char *fn, int action,
|
||||
|
||||
#ifndef COMPILE_ONLY
|
||||
if ((rv = apprentice_map(ms, &magic, &nmagic, fn)) == -1) {
|
||||
- if (ms->flags & MAGIC_CHECK)
|
||||
+ if (ms->flags & MAGIC_CHECK && strcmp("/etc/magic", fn) != 0)
|
||||
file_magwarn(ms, "using regular magic file `%s'", fn);
|
||||
rv = apprentice_load(ms, &magic, &nmagic, fn, action);
|
||||
if (rv != 0)
|
||||
|
||||
--
|
||||
1.7.7.4
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
Summary: A utility for determining file types
|
||||
Name: file
|
||||
Version: 5.10
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: BSD
|
||||
Group: Applications/File
|
||||
Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
|
||||
@ -152,6 +152,10 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Jan 03 2012 Jan Kaluza <jkaluza@redhat.com> - 5.10-3
|
||||
- fix #771292 - do not show 'using regular magic file' warning for /etc/magic,
|
||||
because this file is not supposed to be compiled
|
||||
|
||||
* Mon Jan 02 2012 Jan Kaluza <jkaluza@redhat.com> - 5.10-2
|
||||
- fix #770006 - detect tnef files
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user