This avoids wrtiting ACLs to tar files twice. Preferred method is
via copyfile(3) (tar option --mac-metadata). If user wants to create
archives with portable NFSv4 ACLs only (SCHILY.acl.ace header with no
GUID data) the --acls and --no-mac-metadata options must be specified
on the command line.
In the manual page be more specific which types of ACLs are stored
with --acls and --mac-metadata options.
Allow enabling and disabling reading or writing of:
Access Control Lists (--acls, --no-acls)
Extended file flags (--fflags, --no-fflags)
Extended attributes (--xattrs, --no-xattrs)
Mac OS X metadata in AppleDouble (--mac-metadata, --no-mac-metadata)
Make --disable-copyfile an alias to --no-mac-metadata.
restore fmtbuff back to fmtbuff_stack, per the intent of the else
condition
Otherwise, there's a chance that fmtbuff used after the mbtowc call
is using an invalid buffer, as fmtbuff_heap has been already free'd.
Reported by: Coverity
CID: 1006126
subtract the buffer len by 1 to account for the needed space for a
NUL terminator, as readlink isn't guaranteed to provide one
Reported by: Coverity
CID: 1331293, 1332105
This issue is not ppc64le specific. I have experienced on my
4.4.22-gnu #1 SMP 1 i686 GNU/Linux. Might be dependant on kernel
version and/or machine load. POSIX says errors after posix_spawnp
returns can be signaled by child exitting with an 127 exit code.
This is not directly useful in libarchive at the present time, but
it might be in the future. If a project which uses this code adds
an atexit(3) handler to clean up memory, and somebody runs:
bsdtar somestring -t
then "omestring" will be interpreted as an (invalid) substitution
rule and call lafe_errc(). However, if the atexit() handler then
calls cleanup_substition(), it will try to free(rule->result)
which was not initialized.
Sponsored by: Tarsnap Backup Inc.
This is the same change that
38b3f516df
made to
libarchive/test/main.c
, but now applied to:
cat/test/main.c
cpio/test/main.c
tar/test/main.c
Sponsored by: Tarsnap Backup Inc.
This adds the assertion_file_mode() function from
libarchive/test/main.c
and applies it to
cat/test/main.c
cpio/test/main.c
tar/test/main.c
Sponsored by: Tarsnap Backup Inc.
The safe_fprintf function attempts to ensure clean output for an
arbitrary sequence of bytes by doing a trial conversion of the
multibyte characters to wide characters -- if the resulting wide
character is printable then we pass through the corresponding bytes
unaltered, otherwise, we convert them to C-style ASCII escapes.
The stack trace in Issue #767 suggest that the 20-byte buffer
was getting overflowed trying to format a non-printable multibyte
character. This should only happen if there is a valid multibyte
character of more than 5 bytes that was unprintable. (Each byte
would get expanded to a four-charcter octal-style escape of the form
"\123" resulting in >20 characters for the >5 byte multibyte character.)
I've not been able to reproduce this, but have expanded the conversion
buffer to 128 bytes on the belief that no multibyte character set
has a single character of more than 32 bytes.
Tar was exiting with success if an input file named on the command
line was not present.
Includes tests for both bsdtar and bsdcpio to ensure this does
not regress.