Commit Graph

5007 Commits

Author SHA1 Message Date
Martin Matuska
584ad8fd32 Merge FreeBSD changes from usr.bin/cpio to contrib/libarchive/cpio:
r204111 (uqs):
Fix common misspelling of hierarchy

r211054 (kientzle);
Fix -R when used with -p.  Previously, the
uname and gname weren't overwritten, so the
disk restore would use those to lookup the
original uid/gid again.  Clearing the uname
and gname prevents this.

r212263 (gjb):
Fix typo in bsdcpio manual:
s/libarchive_formats/libarchive-formats

MFC after:	2 weeks
2011-12-21 15:33:13 +00:00
Martin Matuska
c5d360f82a Merge FreeBSD changes from usr.bin/tar to contrib/libarchive/tar:
r204111 (uqs):
Fix common misspelling of hierarchy

r207786 (kientzle):
Various manpage updates, including many long-option synonyms that were
previously undocumented.

r208028 (uqs):
mdoc: move remaining sections into consistent order

This pertains mostly to FILES, HISTORY, EXIT STATUS and AUTHORS sections.

r209152 (kientzle):
If the compressed data is larger than the uncompressed,
report the compression ratio as 0% instead of displaying
nonsense triggered by numeric overflow.  This is common
when dealing with uncompressed files when the I/O blocking
causes there to be small transient differences in the
accounting.

r210720 (joel):
Fix typos.

r223541 (kientzle):
If there is a read error reading Y/N confirmation from the keyboard,
exit immediately with an error.

If there is an error opening or reading a file to put into the archive,
set the return value for a deferred error exit.

r223573 (kientzle):
The --newer-than test should descend into old
directories to look for new files.

r226636 (kientzle):
Typo from previous commit. Urgh.

r224153 (mm, partial):
Update bsdtar.1 manpage

MFC after:	2 weeks
2011-12-21 15:30:49 +00:00
Martin Matuska
e9dd49674a Merge FreeBSD changes from usr.bin/tar to contrib/libarchive/libarchive_fe:
r213469:
Recognize both ! and ^ as markers for negated character classes.

MFC after:	2 weeks
2011-12-21 15:22:05 +00:00
Martin Matuska
457fe389bb Add $FreeBSD$ to libarchive_fe headers where missing.
MFC after:	2 weeks
2011-12-21 15:20:17 +00:00
Martin Matuska
e2f3482b4e Merge FreeBSD changes from lib/libarchive to contrib/libarchive:
r204111 (uqs):
Fix common misspelling of hierarchy

r208027 (uqs):
mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to the
bottom of the manpages and order them consistently.

GNU groff doesn't care about the ordering, and doesn't even mention
CAVEATS and SECURITY CONSIDERATIONS as common sections and where to put
them.

r208291 (uqs):
mdoc: consistently spell our email addresses <foo@FreeBSD.org>

r209031 (uqs):
mdoc nitpicking: the title argument shall be uppercase

r214822 (kientzle):
Clarify the naming:  Methods that free an object should
be called "free".  Retain the old "finish" names to preserve
source compatibility for now.

r214905 (kientzle):
If the Zip reader doesn't see a PK signature block
because there's inter-entry garbage, just scan forward
to find the next one.  This allows us to handle a lot
of Zip archives that have been modified in-place.

Thanks to: Gleb Kurtsou for sending me a sample archive

r216258 (kientzle):
Don't write data into an empty "file."

In particular, this check avoids a warning when
extracting directory entries from certain GNU tar
archives that store directory contents.

r225525 (kientzle):
Fix cpio on ARM.

MFC after:	2 weeks
2011-12-21 15:18:52 +00:00
Martin Matuska
1aafefdbe8 Add missing integer casts to comparsions in libarchive read.
MFC after:	2 weeks
2011-12-21 15:06:01 +00:00
Martin Matuska
05c7cce2cc Partial merge of r224691 from lib/libarchive:
Add compatibility for ISO images created with unfixed makefs that
violated ECMA-119 (ISO9660): allow reserved4 to be 0x20 in PVD.
This allows tar to read FreeBSD distribution ISO images created
with makefs prior to NetBSD bin/45217 bugfix (up to 9.0-BETA1).

MFC after:	2 weeks
2011-12-21 15:02:37 +00:00
Martin Matuska
81e77e7031 Remove libarchive/archive_entry_copy_bhfi.c and libarchive/mtree.5
Add these files to FREEBSD-Xlist

MFC after:	2 weeks
2011-12-21 14:58:44 +00:00
Martin Matuska
6151a4093b Remove config_freebsd.h and add to FREEBSD-Xlist
This file is common for libarchive, cpio and tar and is going to be located
outside of contrib (lib/libarchive)
2011-12-21 12:59:09 +00:00
Martin Matuska
76c1e34f2e Strip unnecessary files and directories from contrib/libarchive
according to FREEBSD-Xlist

MFC after:	2 weeks
2011-12-21 11:18:49 +00:00
Martin Matuska
6c22d9efb7 Set svn:keywords to FreeBSD=%H for contrib/libarchive
MFC after:	2 weeks
2011-12-21 11:13:29 +00:00
Martin Matuska
bc951bc441 Add FREEBSD-Xlist and FREEBSD-upgrade to contrib/libarchive
MFC after:	2 weeks
2011-12-21 11:11:51 +00:00
Martin Matuska
caf54c4f6c Copy libarchive from vendor branch to contrib
MFC after:	2 weeks
2011-12-21 11:09:24 +00:00
Pedro F. Giffuni
4ee8547efb Clean an inconsistency with -ffinite-math-only.
Backported from the gcc-4_3-branch, revision 118001,
under the GPLv2.

This issue was also fixed in Apple's gcc.

PR:		157025
Reviewed by:	mm
Approved by:	jhb (mentor)
MFC:		2 weeks
2011-12-21 01:58:35 +00:00
Martin Matuska
35fa5e2f58 Vendor import of libarchive (release/2.8, r3824)
Obtained from:	http://libarchive.googlecode.com/svn/release/2.8
2011-12-20 22:47:56 +00:00
Gleb Smirnoff
f08535f872 Restore a feature that was present in 5.x and 6.x, and was cleared in
7.x, 8.x and 9.x with pf(4) imports: pfsync(4) should suppress CARP
preemption, while it is running its bulk update.

However, reimplement the feature in more elegant manner, that is
partially inspired by newer OpenBSD:

- Rename term "suppression" to "demotion", to match with OpenBSD.
- Keep a global demotion factor, that can be raised by several
  conditions, for now these are:
  - interface goes down
  - carp(4) has problems with ip_output() or ip6_output()
  - pfsync performs bulk update
- Unlike in OpenBSD the demotion factor isn't a counter, but
  is actual value added to advskew. The adjustment values for
  particular error conditions are also configurable, and their
  defaults are maximum advskew value, so a single failure bumps
  demotion to maximum. This is for POLA compatibility, and should
  satisfy most users.
- Demotion factor is a writable sysctl, so user can do
  foot shooting, if he desires to.
2011-12-20 13:53:31 +00:00
Gleb Smirnoff
df6faa4c5c - Fix examples to show new CARP style.
- Remove OpenBSDisms, add FreeBSDisms.
2011-12-20 13:32:56 +00:00
Dimitry Andric
3803473797 In contrib/tcpdump/print-icmp6.c, fix a problem where the comparison
against icmp6_hdr::icmp6_type is done incorrectly.  (This fix has
already been applied upstream, but we do not have the latest version of
tcpdump.)

MFC after:	1 week
2011-12-19 17:32:54 +00:00
Dag-Erling Smørgrav
7f106882fe Upgrade to OpenPAM Lycopsida. 2011-12-18 17:22:45 +00:00
Dimitry Andric
6d683f9dfa In contrib/pnpinfo/pnpinfo.c, remove an extraneous parameter from the
call to isolation_protocol().

MFC after:	1 week
2011-12-17 23:43:40 +00:00
Dimitry Andric
e9db6b2474 In contrib/telnet/telnet/utilities.c, fix a few warnings about format
strings not being literals.

MFC after:	1 week
2011-12-17 18:18:36 +00:00
Dimitry Andric
8ee4178c4c In contrib/less, cast away const a bunch of times, to make it build
without conversion warnings.  This code desparately needs a good dose of
const poison, but fixing all the issues would be rather disruptive.

MFC after:	1 week
2011-12-17 16:10:14 +00:00
Dimitry Andric
8f04da68ad In contrib/ee/ee.c, fix a few warnings about format strings not being
literals.  Also, change the direction argument to move_rel() from char
to int; K&R function definions cause it to be promoted to an int anyway,
and this way we avoid clang warning about it.

MFC after:	1 week
2011-12-17 14:26:16 +00:00
Dimitry Andric
586f63035f In contrib/bzip2/bzip2recover.c, use the correct printf length modifier
for unsigned long long.

MFC after:	1 week
2011-12-17 12:52:58 +00:00
Bjoern A. Zeeb
1e629ba90f Adter r228571 unbreak architectures with strict alignment rules
by copying rather than casting.
2011-12-17 11:06:22 +00:00
Dimitry Andric
cf87966cfd In contrib/gperf/src/output.cc, use the correct printf length modifier
for a ptrdiff_t.

MFC after:	1 week
2011-12-16 23:15:11 +00:00
Dimitry Andric
1f8811efbc In contrib/telnet/telnetd/utility.c, fix a few warnings about format
strings not being literals.

MFC after:	1 week
2011-12-16 16:53:54 +00:00
Dimitry Andric
675be9115a In contrib/telnet/libtelnet/sra.c, use the correct number of bytes to
zero the password buffer.

MFC after:	1 week
2011-12-16 00:48:53 +00:00
Dimitry Andric
0adb64b5d9 In contrib/file/softmagic.c, fix a potential format string security
problem.  (This fix has already been applied upstream, but we do not
have the latest version of file in the tree at the moment.)

MFC after:	1 week
2011-12-15 23:28:17 +00:00
Ed Schouten
bdc971eb19 Add support for __COUNTER__.
__COUNTER__ allows one to obtain incrementing (read: unique) numbers
from the C preprocesor. This is useful when implementing things like a
robust implementation of CTASSERT(), which currently fails when using
it more than once on a single line of code. Probably not likely to cause
any breakage, but still.

__COUNTER__ was also added to GCC 4.3, but since that implementation is
GPLv3 licensed, I took the liberty of implementing it without looking at
any upstream sources. Therefore, this version is licensed under the same
license as the rest of the code; GPLv2.
2011-12-13 17:34:47 +00:00
Mikolaj Golub
b2b91ddf9d Include sys/queue.h: snmpmod.h uses TAILQ.
PR:		bin/153153
MFC after:	2 weeks
2011-12-11 17:10:33 +00:00
Dag-Erling Smørgrav
4125bad6b4 Add minimal validation of the service name to fend off at least one
attack vector against applications that allow the applicant to specify
which policy to apply.

Submitted by:	Matthias Drochner <drochner@netbsd.org>
MFC after:	1 week
2011-12-10 01:44:24 +00:00
Dimitry Andric
f8254f43c5 Upgrade our copy of llvm/clang to 3.0 release. Release notes can be
found at: http://llvm.org/releases/3.0/docs/ReleaseNotes.html

MFC after:	1 week
2011-12-09 22:23:45 +00:00
Ruslan Ermilov
dd5e6f8a24 Pull up vendor changes to mdoc(7). 2011-12-08 13:54:06 +00:00
Eitan Adler
b5828c5723 - set progname for use in usage()
PR:		bin/162908
Submitted by:	Oleg Ginzburg <olevole@olevole.ru>
Approved by:	sbruno@
MFC after:	3 days
2011-12-08 02:40:46 +00:00
Dimitry Andric
2c4ebe03a0 Make it possible to use the debug versions of std::map and std::multimap
with clang, by removing two unneeded using declarations.  Otherwise, you
would get errors similar to:

/usr/include/c++/4.2/debug/map.h:77:20: error: dependent using declaration resolved to type without 'typename'
      using _Base::value_compare;
                   ^

N.B.: Take care when you actually use the debug versions of any
libstdc++ header.  They are more likely to contain problems, because
they are exercised far less often, and since the standard library
complexity guarantees don't always apply anymore, compile times can
drastically increase.

MFC after:	2 weeks
2011-12-07 21:00:33 +00:00
Baptiste Daroussin
b9f9c1ef99 Reimport .texi and .texinfo necessary to build the info documentation.
Reported by:	flo
Approved by:	cognet
2011-11-28 14:23:09 +00:00
Baptiste Daroussin
acca521c82 upgrade gperf to the last GPLv2 version (3.0.3)
Reviewed by:	cognet
Approved by:	cognet
2011-11-28 12:29:16 +00:00
David Chisnall
db47c4bf21 Update libcxxrt to remove the pthread dependency.
Also add the license from upstream to contrib.

Approved by:	dim (mentor)
2011-11-26 18:46:33 +00:00
David Chisnall
7a98470824 Import libc++ / libcxxrt into base. Not build by default yet (use
MK_LIBCPLUSPLUS=yes to enable).  This is a work-in-progress.  It works for
me, but is not guaranteed to work for anyone else and may eat your dog.

To build C++ using libc++, add -stdlib=libc++ to your CXX and LD flags.

Bug reports welcome, bug fixes even more welcome...

Approved by:	dim (mentor)
2011-11-25 20:59:04 +00:00
David Chisnall
3c87aa1d3d Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a
load of _l suffixed versions of various standard library functions that use
the global locale, making them take an explicit locale parameter.  Also
adds support for per-thread locales.  This work was funded by the FreeBSD
Foundation.

Please test any code you have that uses the C standard locale functions!

Reviewed by:    das (gdtoa changes)
Approved by:    dim (mentor)
2011-11-20 14:45:42 +00:00
Andreas Tobler
6bac4c3e6a Rename the linker emulation name for powerpc and powerc64. This is needed that
we can also use the upstream binutils linker where we have to have a unique
name for the FreeBSD emulation.
2011-11-19 19:25:57 +00:00
Dimitry Andric
4b146ddfab Pull in r144505 from upstream clang trunk:
Fix the signature of the getcontext builtin, eliminating incorrect
warnings about its prototype.

This also adds a -W(no-)builtin-requires-header option, which can be
used to enable or disable warnings of this kind.

MFC after:	1 week
2011-11-19 18:01:14 +00:00
Dimitry Andric
a8c61d8787 Pull in r144237 from upstream clang trunk:
Fix the signature of __sigsetjmp and sigsetjmp.  This eliminates
incorrect warnings about the prototypes of these functions.

MFC after:	1 week
2011-11-19 17:15:20 +00:00
Dimitry Andric
65b2c60c75 Pull in r144110 from upstream clang trunk:
Mark the overloaded atomic builtins as having custom type checking,
which they do. This avoids all of the default argument promotions that
we (1) don't want, and (2) undo during that custom type checking, and
makes sure that we don't run into trouble during template
instantiation. Fixes llvm/clang PR11320.

MFC after:	1 week
2011-11-19 17:09:36 +00:00
Doug Barton
b62e898e00 Upgrade to BIND 9.8.1-P1 to address the following DDOS bug:
Recursive name servers are failing with an assertion:
INSIST(! dns_rdataset_isassociated(sigrdataset))

At this time it is not thought that authoritative-only servers
are affected, but information about this bug is evolving rapidly.

Because it may be possible to trigger this bug even on networks
that do not allow untrusted users to access the recursive name
servers (perhaps via specially crafted e-mail messages, and/or
malicious web sites) it is recommended that ALL operators of
recursive name servers upgrade immediately.

For more information see:
https://www.isc.org/software/bind/advisories/cve-2011-tbd
which will be updated as more information becomes available.

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-4313
2011-11-17 00:25:35 +00:00
Andreas Tobler
8e803f5a7c Copy over the ASM_DECLARE_FUNCTION_SIZE macro from linux64.h. This macro
declares the proper size of a function. Without this macro recent GNU as will
complain about with:
'Error: .size expression for main does not evaluate to a constant.'

Up to now we produce this:

.L.main:
 	....
	.size   main, .-main

With the macro defined the output is this:

.L.main:
 	....
	.size   main,.-.L.main

This affects only the 64-bit compiler.
Tested with world and kernel on both, 32 and 64-bit powerpc.
2011-11-16 21:22:51 +00:00
Fabien Thomas
da5a448eb2 Import gcc fix for -fstack-protector that produces segfaulting
binaries on arm/armel.

Related gcc bug:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35965

PR: 161128
MFC after: 1 week
2011-11-09 15:59:02 +00:00
Edwin Groothuis
550d397e7d MFV of r226974, tzdata2011n
- Fiji will end DST on 22 January 2012.
- Moldova split into two timezones has been cancelled.
- Cuba will end DST on 13 November 2011

Obtained from:	ftp://ftp.iana.org/tz/releases/
2011-11-01 02:01:55 +00:00
Dimitry Andric
d883a297a1 Pull in r143305 and r143312 from upstream clang trunk, so using "clang
-march=native" on AMD K10 family processors no longer errors out with
"unknown target CPU 'amdfam10'".  This also enables use of SSE4A.

Reported by:	David Marec <david.marec@davenulle.org>
MFC after:	3 days
2011-10-30 22:20:17 +00:00