Age | Commit message (Collapse) | Author |
|
This fixes a problem where the file list output was fully-buffered
when used as part of a pipeline. With this change, files are listed
as they are extracted in verbose mode. OK deraadt@ guenther@
|
|
Add missing error checks to all calls under bin/
Input & OK millert
|
|
Spotted by kettenis.
|
|
found using afl++
OK millert
|
|
ok tb@
|
|
The existing tar_opt() implements support for -o write_opt=nodir for the
old tar and ustar formats. We don't really want to support it for the
pax format, and we want to be able to implement pax format specific
options (even if there are none right now). ok millert@
|
|
|
|
Spotted by caspar@ earlier
|
|
Lets us store longer file names, link names, finer grained timestamps,
larger archive member files, etc; at the expense of larger uncompressed
archives and less widespread support across the ecosystem. If you're
unhappy with the new defaults, you can use -F ustar. Or you can help
fix bugs / find a better middle ground.
Prodding from various including job@ and deraadt@
ok sthen@ caspar@ millert@
|
|
512 bytes isn't enough if you want to store rather large but still
useful long file names or symbolic links destinations. The best way to
size the buffer to read those records is based upon the largest paths
pax(1) can handle, and that is PAXPATHLEN.
Reported by caspar@, input and ok millert@
|
|
|
|
|
|
We want to move towards 'pax' as the default format for writing, this
option lets users downgrade to -F ustar where the 'pax' format isn't
convenient/usable (same as -x <format> in pax(1)).
-F <format> is more generic than -o/-O. -H (GNU tar) was already used
and we don't want long options so --format (NetBSD/FreeBSD) is excluded
too.
ok sthen@ caspar@ millert@
|
|
We expect that existing pax archives start with a global or extended
header. If they don't, append operations will be done using ustar
format.
Fixes append mode on pax archives where pax(1) would bail out when
appending to pax archives, falsely detecting a mismatch. Reading was
unaffected. Reported by caspar@, ok caspar@ millert@
|
|
|
|
ramdisk versions will keep using ustar for writing.
ok millert@
|
|
Fixes a crash in "ls -l" for files with bogus timestamp values.
OK miod@ denis@
|
|
|
|
Softdep has been a no-op for some time now, this removes it to get
it out of the way.
Flensing mostly done in Talinn, with some help from krw@
ok deraadt@
|
|
to provide visibility of the internal behaviour of pinsyscalls(2) during
introduction. These flags remain (less) visible in the "-o procflags"
option, as 0x08000000 (PS_PIN) and 0x10000000 (PS_LIBCPIN).
That's good enough.
|
|
As specified, don't include the subsecond part if zero and drop trailing
zeros in the subsecond part. ok millert@
|
|
and 'L' for libc.so. This flag printing may be deleted once we are entirely
confident this is working correctly.
ok kettenis
|
|
Access time can't be represented by ustar, so always include it when
using the pax format. Also include an extended header record for mtime
if the file modification time can't be fully represented by ustar (eg
subsecond resolution).
Input & ok millert@
|
|
|
|
ok millert@
|
|
Use name, not ln_name. Pasto introduced in previous.
|
|
Keep writing archives in ustar format by default. People can test the
posix 'pax' format using pax(1) -w -x pax ... or cpio -o -H pax ...;
tar(1) can't exercise this code yet. Only long names file and link
names are supported for now.
With input and tests from caspar@, ok millert@
|
|
code slightly easier to understand.
okay and tweak kn@
|
|
Turn [-U username] into [-U user] to match top(1)/pgrep(1)/fstat(1) -U/-u
taking both "root" and "0".
Feedback OK millert
|
|
Drop "wpath cpath fattr dpath" in read-only:
- cpio -i -t < test.tar
- pax < test.tar
- tar -t -f test.tar
Drop "cpath fattr dpath" in read-write:
- echo foo | cpio -o -A -H ustar -O test.tar
- tar -r -f test.tar foo
- pax -w -a -f test.tar foo
Other modes remain unchanged and thus can create or modify files.
Feedback OK millert
|
|
The -c option can handle entries in normal (BSD) and reverse (GNU)
format. Both hex and base64 entries are supported. OK jmc@
|
|
In reverse mode, the entry does not include the digest algorithm
so the specified algorithm (or the default) is used when checking.
OK deraadt@
|
|
Triggered by a smaller diff from jan@.
OK jmc@ jan@
|
|
Spotted while comparing ktraces between 'tar -z' and 'gzcat | tar -f-'.
Only the former runs, e.g. gzip(1), but the latter also pledges theses promises
just to pledge again immediately afterwards without them.
Make the calls mutually exclusive so 'tar -f-' et al. skip the first pledge
and thus never have "proc exec" to begin wth.
"looks good to me" mbuhl
OK millert
|
|
on the stack. No functional change, +8 -15 LOC.
Suggested by and OK millert@.
|
|
device numbers greater than 999 by measuring the two widths needed
for device numbers just like it is already done for other numbers.
In the output, this only changes whitespace, but not the text.
Ugly formatting reported by
Crystal Kolipe <kolipe dot c at exoticsilicon dot com>.
OK millert. Also tested by Crystal Kolipe.
|
|
p_tv() is identical to p_ts(). Better to not have two copies: in
p_tv(), convert the timeval to a timespec and pass it to p_ts().
With input from tb@ and millert@.
Thread: https://marc.info/?l=openbsd-tech&m=169448818503541&w=2
ok tb@ millert@
|
|
-DSMALL has never been used to build the ramdisks, thus the support for
reading pax format archives has always been there. This is misleading,
so just zap the ifdef since we want to keep read support.
Went through a make release Just In Case(tm).
Spotted by caspar@, ok millert@ sthen@ caspar@
|
|
the st_*time and (obsolete) st_*timensec members separately.
ok millert@
|
|
|
|
the POSIX-standard st_*tim.tv_nsec members.
ok millert@
|
|
comments sthen@ and Peter J. Philipp <pjp AT delphinusdns DOT org>
ok jmc@
|
|
ksh(1) MAIL, MAILCHECK, MAILPATH mbox handling is useless in the installer.
OK miod deraadt
|
|
Previously, when creating an archive file with pax(1), pax will attempt
to open a file even if the file will be skipped due to an -s replacement
with the empty string. With this change, pax will not attempt to open
files that it knows will be skipped.
When doing direct copies to a directory (-rw), pax already skips
the file before attempting to open it. So this makes the behavior
more consistent.
This can measurably speed up pax when skipping a large number of files.
OK tb@
|
|
|
|
initializers as they are not required to be compile-time constants.
So, intialize these global variables at the top of main().
ok miod@ deraadt@ yasuoka@ millert@
|
|
If the mtime in the file header is larger than MAX_TIME_T, trucate
it to MAX_TIME_T, not INT_MAX. OK otto@
|
|
Reported by David Leadbeater. OK op@
|
|
|
|
If there are multiple matches when using autocomplete, the list of
matching file names was output as-is. However, for a single match,
control characters are escaped before the file name is displayed.
This makes the behavior more consistent by escaping control chars
in the list of matches too. Discussed with deraadt@, OK op@
|