summaryrefslogtreecommitdiffstats
path: root/contrib/file/doc
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2015-06-10 19:22:41 +0000
committerdelphij <delphij@FreeBSD.org>2015-06-10 19:22:41 +0000
commit7d7b7b5da36a9fbecf1110d65e3693b9347630d9 (patch)
treebf2d8b473f0726bcdeb36d064078c17b8e7d13cf /contrib/file/doc
parent352275060a62b930cc38ca67aff50948c9441845 (diff)
parentc042ae22175d978baeb8b11c92152e4aa035e36a (diff)
downloadFreeBSD-src-7d7b7b5da36a9fbecf1110d65e3693b9347630d9.zip
FreeBSD-src-7d7b7b5da36a9fbecf1110d65e3693b9347630d9.tar.gz
MFV r284234:
Update file to 5.23. MFC after: 2 weeks
Diffstat (limited to 'contrib/file/doc')
-rw-r--r--contrib/file/doc/Makefile.in22
-rw-r--r--contrib/file/doc/file.man38
-rw-r--r--contrib/file/doc/libmagic.man8
3 files changed, 56 insertions, 12 deletions
diff --git a/contrib/file/doc/Makefile.in b/contrib/file/doc/Makefile.in
index 8d0fa7b..165918a 100644
--- a/contrib/file/doc/Makefile.in
+++ b/contrib/file/doc/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,17 @@
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@@ -77,7 +87,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = doc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
@@ -85,6 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
@@ -144,6 +154,7 @@ man5dir = $(mandir)/man5
NROFF = nroff
MANS = $(man_MANS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
pkgdatadir = @pkgdatadir@
ACLOCAL = @ACLOCAL@
@@ -286,7 +297,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign doc/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -642,6 +652,8 @@ uninstall-man: uninstall-man1 uninstall-man3 uninstall-man4 \
tags-am uninstall uninstall-am uninstall-man uninstall-man1 \
uninstall-man3 uninstall-man4 uninstall-man5
+.PRECIOUS: Makefile
+
file.1: Makefile file.man
@rm -f $@
diff --git a/contrib/file/doc/file.man b/contrib/file/doc/file.man
index 109c676..d4d3e58 100644
--- a/contrib/file/doc/file.man
+++ b/contrib/file/doc/file.man
@@ -1,5 +1,5 @@
-.\" $File: file.man,v 1.111 2014/12/16 23:18:40 christos Exp $
-.Dd December 16, 2014
+.\" $File: file.man,v 1.117 2015/06/03 19:51:27 christos Exp $
+.Dd June 3, 2015
.Dt FILE __CSECTION__
.Os
.Sh NAME
@@ -8,8 +8,9 @@
.Sh SYNOPSIS
.Nm
.Bk -words
-.Op Fl bcEhiklLNnprsvz0
+.Op Fl bcEhiklLNnprsvzZ0
.Op Fl Fl apple
+.Op Fl Fl extension
.Op Fl Fl mime-encoding
.Op Fl Fl mime-type
.Op Fl e Ar testname
@@ -213,6 +214,8 @@ Consults magic files.
.It tar
Examines tar files.
.El
+.It Fl Fl extension
+Print a slash-separated list of valid extensions for the file type found.
.It Fl F , Fl Fl separator Ar separator
Use the specified string as the separator between the filename and the
file result returned.
@@ -343,6 +346,9 @@ since on some systems it reports a zero size for raw disk partitions.
Print the version of the program and exit.
.It Fl z , Fl Fl uncompress
Try to look inside compressed files.
+.It Fl Z , Fl Fl uncompress-noreport
+Try to look inside compressed files, but report information about the contents
+only not the compression.
.It Fl 0 , Fl Fl print0
Output a null character
.Sq \e0
@@ -587,20 +593,30 @@ last-pushed (most specific, one hopes) value at the end, or
use a default if the list is empty.
This should not slow down evaluation.
.Pp
+The handling of
+.Dv MAGIC_CONTINUE
+and printing \e012- between entries is clumsy and complicated; refactor
+and centralize.
+.Pp
+Some of the encoding logic is hard-coded in encoding.c and can be moved
+to the magic files if we had a !:charset annotation
+.Pp
Continue to squash all magic bugs.
See Debian BTS for a good source.
.Pp
Store arbitrarily long strings, for example for %s patterns, so that
they can be printed out.
Fixes Debian bug #271672.
-Would require more complex store/load code in apprentice.
+This can be done by allocating strings in a string pool, storing the
+string pool at the end of the magic file and converting all the string
+pointers to relative offsets from the string pool.
.Pp
Add syntax for relative offsets after current level (Debian bug #466037).
.Pp
Make file -ki work, i.e. give multiple MIME types.
.Pp
Add a zip library so we can peek inside Office2007 documents to
-figure out what they are.
+print more details about their contents.
.Pp
Add an option to print URLs for the sources of the file descriptions.
.Pp
@@ -610,6 +626,9 @@ string to be looked up in a table).
This would avoid adding the same magic repeatedly for each new
hash-bang interpreter.
.Pp
+When a file descriptor is available, we can skip and adjust the buffer
+instead of the hacky buffer management we do now.
+.Pp
Fix
.Dq name
and
@@ -627,6 +646,15 @@ Make
more efficient by keeping a sorted list of names.
Special-case ^ to flip endianness in the parser so that it does not
have to be escaped, and document it.
+.Pp
+If the offsets specified internally in the file exceed the buffer size
+(
+.Dv HOWMANY
+variable in file.h), then we don't seek to that offset, but we give up.
+It would be better if buffer managements was done when the file descriptor
+is available so move around the file.
+One must be careful though because this has performance (and thus security
+considerations).
.Sh AVAILABILITY
You can obtain the original author's latest version by anonymous FTP
on
diff --git a/contrib/file/doc/libmagic.man b/contrib/file/doc/libmagic.man
index 3c907ca..64170a3 100644
--- a/contrib/file/doc/libmagic.man
+++ b/contrib/file/doc/libmagic.man
@@ -1,4 +1,4 @@
-.\" $File: libmagic.man,v 1.34 2014/12/16 23:18:40 christos Exp $
+.\" $File: libmagic.man,v 1.37 2015/06/03 18:21:24 christos Exp $
.\"
.\" Copyright (c) Christos Zoulas 2003.
.\" All Rights Reserved.
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd December 16, 2014
+.Dd June 3, 2015
.Dt LIBMAGIC 3
.Os
.Sh NAME
@@ -132,6 +132,10 @@ Treat operating system errors while trying to open files and follow symlinks
as real errors, instead of printing them in the magic buffer.
.It Dv MAGIC_APPLE
Return the Apple creator and type.
+.It Dv MAGIC_EXTENSION
+Return a slash-separated list of extensions for this file type.
+.It Dv MAGIC_COMPRESS_TRANSP
+Don't report on compression, only report about the uncompressed data.
.It Dv MAGIC_NO_CHECK_APPTYPE
Don't check for
.Dv EMX
OpenPOWER on IntegriCloud