freebsd-dev/usr.bin/ar
Ed Maste 56ad941995 ar: Disallow directory traversal
Set ARCHIVE_EXTRACT_SECURE_SYMLINKS and ARCHIVE_EXTRACT_SECURE_NODOTDOT
as in bsdtar to prevent extraction of archive entries whose pathnames
contain .. or whose target directory would be altered by a symlink.
Also disallow absolute pathnames.

We don't currently provide an option to disable this behaviour (as
bsdtar's -P does). It is unlikely to be a problem in practice for ar(1),
but the -P option is not currently used and available if we want to
consider it for this purpose.

Differential Revision:	https://reviews.freebsd.org/D1524
Reported by:	Alexander Cherepanov <cherepan@mccme.ru>
Approved by:	delphij
Obtained from:	ELF tool chain ar, Ticket #474
MFC after:	1 week
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2015-04-09 13:45:17 +00:00
..
acplex.l Work around build breakages with GCC 4.2. 2013-05-23 05:42:35 +00:00
acpyacc.y Replace deprecated (or remove obsolete) libarchive 2.8 functions 2013-03-22 10:17:42 +00:00
ar.1 use .Mt to mark up email addresses consistently (part3) 2014-06-23 08:23:05 +00:00
ar.c
ar.h
Makefile Convert to usr.bin/ to LIBADD 2014-11-25 14:29:10 +00:00
read.c ar: Disallow directory traversal 2015-04-09 13:45:17 +00:00
util.c
write.c Replace deprecated (or remove obsolete) libarchive 2.8 functions 2013-03-22 10:17:42 +00:00