Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: othersrc/external/bsd/mat

Module Name:    othersrc
Committed By:   agc
Date:           Sat Jun 25 17:05:35 UTC 2011

Modified Files:
        othersrc/external/bsd/mat/dist: frontends.c mat.1 mat.c mat.h matpax.1
        othersrc/external/bsd/mat/mat: Makefile

Log Message:
Add a substitution phase via -s '|regexp|replace|' to the tar and pax
frontends to mat(1) and libmat(3).  This allows filenames to be
manipulated on entry to or exit from an archive, so that entries can
be created in the mat archive with generic filenames (such as
"@extractiondir@" or similar), which can be manipulated when
extracting archive components accordingly.

The substitution pattern uses the first character of the argument as
the delimiter, which can itself be escaped using the '\\' character,
should anyone be massochistic as to want to use the '/' character to
delimit file and directory names in a substitution pattern. Extended
regular expressions (NOT wildcards, fnmatch or glob patterns) are
used to match file name patterns.

The same archive security and integirty checks are made for archives
when extracting or listing, so it will not be possible to extract any
archive which has been constructed with a component name starting with
a '/', or which contains the "/../" pattern.  Should such a pattern be
wanted or needed, (and the big question there is "WHY???????"), then a
generic pattern can be substituted at mat archive creation time, and
the extracting user will explicitly need to specify that pattern at
extraction time.  This is, however, really not advised, and a
different way of creating the mat archive should be found.

Also change the mat(1) (and mattar(1)) man pages to use better and
more real-life examples.

Add tests for the -s functionality.

To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/mat/dist/frontends.c \
cvs rdiff -u -r1.7 -r1.8 othersrc/external/bsd/mat/dist/mat.1
cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/mat/dist/mat.h
cvs rdiff -u -r1.4 -r1.5 othersrc/external/bsd/mat/dist/matpax.1
cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/mat/mat/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Home | Main Index | Thread Index | Old Index