From f25107f625e88726e8ae9d4963573b5a0dda8f4c Mon Sep 17 00:00:00 2001 From: Jan Kaluza Date: Thu, 15 Dec 2011 16:15:41 +0100 Subject: [PATCH] localmagic --- src/Makefile.am | 2 +- src/Makefile.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index cba64ac..5e48dff 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,4 @@ -MAGIC = $(pkgdatadir)/magic +MAGIC = /etc/magic:$(pkgdatadir)/magic lib_LTLIBRARIES = libmagic.la include_HEADERS = magic.h diff --git a/magic/magic.local b/magic/magic.local new file mode 100644 index 0000000..283a863 --- /dev/null +++ b/magic/magic.local @@ -0,0 +1,3 @@ +# Magic local data for file(1) command. +# Insert here your local magic data. Format is described in magic(5). + diff --git a/src/Makefile.in b/src/Makefile.in index 39b1703..3dd92d8 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -240,7 +240,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -MAGIC = $(pkgdatadir)/magic +MAGIC = /etc/magic:$(pkgdatadir)/magic 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