Commit Graph

12570 Commits

Author SHA1 Message Date
Doug Barton
536613bc35 Add support for the build options that are currently in the port:
WITH_BIND_IDN
	WITH_BIND_LARGE_FILE
	WITH_BIND_SIGCHASE
	WITH_BIND_XML
2009-06-01 21:58:59 +00:00
Pawel Jakub Dawidek
2430d82448 Document EINVAL for bind(2).
Reviewed by:	rwatson
Obtained from:	SuSv3
2009-06-01 09:32:12 +00:00
Ed Schouten
f6b7b70512 Fix minor issues in libstand.
- Don't call tftp_makereq() with too many arguments.
- Don't forget to close one of the comments.

Submitted by:	Pawel Worach
2009-05-31 21:29:07 +00:00
Doug Barton
6318052d9e Update BIND to version 9.6.1rc1. This version has better performance and
lots of new features compared to 9.4.x, including:

	Full NSEC3 support
	Automatic zone re-signing
	New update-policy methods tcp-self and 6to4-self
	DHCID support.
	More detailed statistics counters including those supported in BIND 8.
	Faster ACL processing.
	Efficient LRU cache-cleaning mechanism.
	NSID support.
2009-05-31 05:42:58 +00:00
Marcel Moolenaar
b6d434fc28 Use GCC's __SOFTFP__ to test whether we're being compiled
with softfloat or not. Now -msoft-float can be overridden
more easily.
2009-05-31 02:03:40 +00:00
Doug Barton
b0e69f719c Vendor import of BIND 9.6.1rc1 2009-05-31 00:11:36 +00:00
Doug Barton
9097ac2a7f In preparation for the BIND 9.6.1rc1 import, remove this directory.
The libbind library is no longer distributed as part of the main
BIND package, and we never built it in any case.
2009-05-30 23:50:12 +00:00
Marcel Moolenaar
2ab2a8354e Print the returned port number when RPC_DEBUG is defined.
This improves debugging.
2009-05-30 19:23:09 +00:00
Tim Kientzle
0b3daf486d Include libmd and libcrypto in DPADD 2009-05-30 17:26:55 +00:00
Tim Kientzle
65b45c166f Link libarchive against -lmd and -lcrypto.
Thanks to Ed Schouten for the clue.
2009-05-30 07:08:16 +00:00
Xin LI
5512745e3a Document how to enable strict RFC 1034 enforcements.
PR:		kern/129477
2009-05-29 07:55:44 +00:00
Xin LI
a28076c8f7 Add an option to enforce strict RFC 1034 compliance.
PR:		kern/129477
2009-05-29 07:34:54 +00:00
Andrew Thompson
8ea36d1e2b Fix missed change from usb2_gen_descriptor to usb_gen_descriptor 2009-05-28 20:21:01 +00:00
Andrew Thompson
760bc48e7e s/usb2_/usb_/ on all C structs for the USB stack. 2009-05-28 17:36:36 +00:00
Zachary Loafman
fcd3177f90 Match type for socket option (in practice, unnecessary, but stylistically it's a little nicer).
Suggested by:       jilles
Approved by:        dfr (mentor)
2009-05-28 15:02:44 +00:00
Zachary Loafman
7014ae09f9 Revert unnecessary memset after calloc.
Suggested by:       jhb
Approved by:        dfr (mentor)
2009-05-28 15:02:21 +00:00
Edward Tomasz Napierala
60a8b6022d Fix off by one error in acl_create_entry(3).
Reviewed by:	rwatson@
MFC after:	2 weeks
2009-05-28 07:20:52 +00:00
Ed Schouten
3d98b75bac Rename the queue macros I introduced last year.
Last year I added SLIST_REMOVE_NEXT and STAILQ_REMOVE_NEXT, to remove
entries behind an element in the list, using O(1) time. I recently
discovered NetBSD also has a similar macro, called SLIST_REMOVE_AFTER.
In my opinion this approach is a lot better:

- It doesn't have the unused first argument of the list pointer. I added
  this, mainly because OpenBSD also had it.

- The _AFTER suffix makes a lot more sense, because it is related to
  SLIST_INSERT_AFTER. _NEXT is only used to iterate through the list.

The reason why I want to rename this now, is to make sure we don't
release a major version with the badly named macros.
2009-05-27 19:28:04 +00:00
Zachary Loafman
35941cc841 Handle UDP RPC replies correctly on a multi-homed system, in userland RPC. Corrects an issue with mountd replies to OS X.
Approved by:        dfr (mentor)
2009-05-27 17:02:15 +00:00
Zachary Loafman
6d72217368 Fix an issue when nss fallback routines are used in a multithreaded application.
Reviewed by:        bushman
Approved by:        dfr (mentor)
2009-05-27 17:01:59 +00:00
Jamie Gritton
0304c73163 Add hierarchical jails. A jail may further virtualize its environment
by creating a child jail, which is visible to that jail and to any
parent jails.  Child jails may be restricted more than their parents,
but never less.  Jail names reflect this hierarchy, being MIB-style
dot-separated strings.

Every thread now points to a jail, the default being prison0, which
contains information about the physical system.  Prison0's root
directory is the same as rootvnode; its hostname is the same as the
global hostname, and its securelevel replaces the global securelevel.
Note that the variable "securelevel" has actually gone away, which
should not cause any problems for code that properly uses
securelevel_gt() and securelevel_ge().

Some jail-related permissions that were kept in global variables and
set via sysctls are now per-jail settings.  The sysctls still exist for
backward compatibility, used only by the now-deprecated jail(2) system
call.

Approved by:	bz (mentor)
2009-05-27 14:11:23 +00:00
Edwin Groothuis
84b2ce0d42 MFV of tzcode2009h revision r192887
- Clarify the license for the tzcode: public domain

MFC after:	1 month
2009-05-27 12:18:39 +00:00
Edward Tomasz Napierala
b7014134a7 Change license to more bori^Wadul^Wcanonical.
Submitted by:	rwatson@
2009-05-26 11:42:06 +00:00
Attilio Rao
9235ed7199 Use, in uncovered part, the END() macro in order to improve debugging.
In this specific case, Valgrind won't get confused when analyzing such
functions.

Sponsored by:	Sandvine Incorporated
Tested by:	emaste
MFC:		3 days
2009-05-25 14:37:10 +00:00
Doug Rabson
3b086f3159 Increase the number of available file descriptors to 64. This fixes the
reported zfsboot problems for systems where more than seven drives are part
of ZFS pools.
2009-05-24 11:37:10 +00:00
Edward Tomasz Napierala
f24f1c51d3 Improve API documentation.
Reviewed by:	rwatson (earlier version)
2009-05-23 13:51:05 +00:00
Edwin Groothuis
dfc79e892f MFV of tzcode2009e:
Upgrade of the tzcode from 2004a to 2009e.

Changes are numerous, but include...

- New format of the output of zic, which supports both 32 and 64
  bit time_t formats.

- zdump on 64 bit platforms will actually produce some output instead
  of doing nothing for a looooooooong time.

- linux_base-fX, with X >= at least 8, will work without problems related
  to the local time again.

The original patch, based on the 2008e, has been running for a long
time on both my laptop and desktop machine and have been tested by
other people.

After the installation of this code and the running of zic(8), you
need to run tzsetup(8) again to install the new datafile.

Approved by:	wollman@ for usr.sbin/zic
MFC after:	1 month
2009-05-23 06:31:50 +00:00
Tim Kientzle
9f1994b5e6 Include the 2 byte length field for the optional "extra data"
field when computing the length of the gzip header.

Thanks to Dag-Erling for pointing me to the OpenSSH tarballs,
which are the first files I've seen that actually used this field.
2009-05-23 04:31:05 +00:00
Edward Tomasz Napierala
ae1add4e55 Make 'struct acl' larger, as required to support NFSv4 ACLs. Provide
compatibility interfaces in both kernel and libc.

Reviewed by:	rwatson
2009-05-22 15:56:43 +00:00
Andrew Thompson
c54c1f7c08 Fix libusb20_dev_get_device_desc and defunt xref.
Submitted by:	Hans Petter Selasky
2009-05-21 17:16:35 +00:00
Marcel Moolenaar
866772cfa7 Simplify now that we have gpart. 2009-05-20 06:01:20 +00:00
Christian Brueffer
a9ffff74c5 Since audit(4) isn't based on posix1e, remove the commented out audit.h header,
xref libbsm(3).

Submitted by:	rwatson
MFC after:	3 days
2009-05-19 22:28:33 +00:00
Edward Tomasz Napierala
a7c13ccc01 Add links to libgeom(3) where appropriate. 2009-05-19 12:10:48 +00:00
John Baldwin
7293f0e67c Update the KVM backend for malloc stats to catch up to the internal structure
BI change from the addition of DTrace malloc(9) probes.

Submitted by:	Ben Kelly  ben of wanderview dot com
2009-05-15 18:25:44 +00:00
Xin LI
718d3b2852 As the comment says, close() frees the variable, record. So we obtain
the length by evaluating the value from the copy, cbuf instead.  This
fixes a crash caused by previous commit (use-after-free)

Submitted by:	Dimitry Andric <dimitry andric com>
Pointy hat to:	delphij
2009-05-14 23:09:33 +00:00
Maksim Yevmenkin
b7ced94c8c Avoid floating point arithmetic while calculating iquiry length.
Submitted by:	Iain Hibbert < plunky -at- rya-online -dot- net >
MFC after:	1 week
2009-05-14 17:10:19 +00:00
Tim Kientzle
c5136006b2 Eliminate duplicate error messages from "tar c".
Reported by:	pav@
2009-05-13 00:04:08 +00:00
Brian Feldman
43af51a2b5 These are some cosmetic changes to improve the clarity of libthr's fork implementation. 2009-05-11 16:45:53 +00:00
Ed Schouten
ba521305e8 TTYs don't necessarily use /dev/ttyxx.
Submitted by:	csjp
2009-05-09 16:42:57 +00:00
Tim Kientzle
fb1db28b6d Partially revert r191171, which went too far in trying
to eliminate some duplicated code.  In particular,
archive_read_open_filename() has different close
handling than archive_read_open_fd(), so delegating
the former to the latter in the degenerate case
(a NULL filename is treated as stdin) broke reading
from pipelines.  In particular, this fixes occasional
port failures that were seen when using "gunzip | tar"
pipelines under /bin/csh.

Thanks to Alexey Shuvaev for reporting this failure and
patiently helping me to track down the cause.
2009-05-07 23:01:03 +00:00
Ed Schouten
46b303e83d Add tcsetsid(3).
The entire world seems to use the non-standard TIOCSCTTY ioctl to make a
TTY a controlling terminal of a session. Even though tcsetsid(3) is also
non-standard, I think it's a lot better to use in our own source code,
mainly because it's similar to tcsetpgrp(), tcgetpgrp() and tcgetsid().

I stole the idea from QNX. They do it the other way around; their
TIOCSCTTY is just a wrapper around tcsetsid(). tcsetsid() then calls
into an IPC framework.
2009-05-07 13:49:48 +00:00
Sam Leffler
f4f8f02054 revert r191633; this breaks at91 & xscale (likely all arm) 2009-05-06 01:50:04 +00:00
Ed Schouten
98669c791d Our grantpt(3) and unlockpt(3) don't comply with POSIX. 2009-05-04 18:14:45 +00:00
Ed Schouten
ab52b803a0 Fix whitespace and sorting in Symbol.map. 2009-05-04 08:06:52 +00:00
David E. O'Brien
7dbb948b5f Merge vendor/file/dist@191739, bringing FILE 5.00 to 8-CURRENT. 2009-05-04 00:37:44 +00:00
Jamie Gritton
b38ff370e4 Introduce the extensible jail framework, using the same "name=value"
interface as nmount(2).  Three new system calls are added:
* jail_set, to create jails and change the parameters of existing jails.
  This replaces jail(2).
* jail_get, to read the parameters of existing jails.  This replaces the
  security.jail.list sysctl.
* jail_remove to kill off a jail's processes and remove the jail.
Most jail parameters may now be changed after creation, and jails may be
set to exist without any attached processes.  The current jail(2) system
call still exists, though it is now a stub to jail_set(2).

Approved by:	bz (mentor)
2009-04-29 21:14:15 +00:00
Jamie Gritton
7074cfa223 With the permission of phk@ change the license on remaining jail code
to a 2 clause BSD license.

Approved by:	phk
Approved by:	bz (mentor)
2009-04-29 16:02:52 +00:00
Bruce M Simpson
6de9a4eb6b Fix an obvious bug in getsourcefilter()'s use of struct __msfilterreq;
the kernel will return in msfr_nsrcs the number of source filters
in-mode for a given multicast group.
However, the filters themselves were never copied out, as the libc
function clobbers this field with zero, causing the kernel to assume
the provided vector of struct sockaddr_storage has zero length.
This bug would only affect users of SSM multicast, which is shimmed
in 7.x.
Picked up during mtest(8) refactoring.

MFC after:	1 day
2009-04-29 09:58:31 +00:00
Olivier Houchard
8957464be7 Change the test at the beginning of strncmp(), from being if (len - 1) < 0
to if (len == 0).
The length is supposed to be unsigned, so len - 1 < 0 won't happen except
if len == 0 anyway, and it would return 0 when it shouldn't, if len was
> INT_MAX.

Spotted out by:	Channa <channa kad gmail com>
2009-04-28 19:20:13 +00:00
Tim Kientzle
04e8ac36ab Document the liblzma support.
Unfortunately, liblzma itself is GPLed, so unlikely to become part of
the FreeBSD base system.
However, the core lzma compression/decompression code is public
domain, so it should be feasible for someone to create a compatible
library without the GPL strings.
2009-04-27 22:39:43 +00:00
Tim Kientzle
59c7a951b5 Symlink some additional man page entries. 2009-04-27 20:23:22 +00:00
Tim Kientzle
4d24dc3687 Merge r991 from libarchive.googlecode.com: Various updates
to archive_read.3 manpage, including documentation for the
new "raw" handler.
2009-04-27 20:13:13 +00:00
Tim Kientzle
690f5ebdc0 Merge r990,r1044 from libarchive.googlecode.com:
read_support_format_raw() allows people to exploit libarchive's
automatic decompression support by simply stubbing out the
archive format handler.
The raw handler is not enabled by support_format_all(), of course.
It bids 1 on any non-empty input and always returns a single
entry named "data" with no properties set.
2009-04-27 20:09:05 +00:00
Tim Kientzle
edca00c7b2 Merge r1061,r1062,r1063 from libarchive.googlecode.com:
Fix reading big-endian binary cpio archives, and add a test.
While I'm here, add a note about Solaris ACL extension for cpio,
which should be relatively straightforward to support.

Thanks to: Edward Napierala, who sent me a big-endian cpio archive
from a Solaris system he's been playing with.
Pointy hat: me
2009-04-27 19:30:09 +00:00
Tim Kientzle
80658f77a3 Merge r1034 from libarchive.googlecode.com:
Put a much larger file on the reference ISO for this test.
2009-04-27 19:23:53 +00:00
Tim Kientzle
0cf3aa1afe Merge r1058 from libarchive.googlecode.com: Require that each
test source file has exactly one DEFINE_TEST().
2009-04-27 19:20:25 +00:00
Tim Kientzle
3da657c177 ino_t varies across platforms; casting (int) here avoids
various pointless complaints.
2009-04-27 19:14:43 +00:00
Tim Kientzle
546cb91d54 Merge r1032 from libarchive.googlecode.com:
Make test_fuzz a bit more sensitive by actually reading the body
of each entry instead of skipping it.
While I'm here, move the "UnsupportedCompress" macro into the
only file that still uses it.
2009-04-27 18:55:22 +00:00
Tim Kientzle
525ed69972 Merge r1054,r1060 from libarchive.googlecode.com:
* assertEqualMem() now takes void * arguments
 * Be a little smarter about what we hexdump when assertEqualMem() fails
2009-04-27 18:39:55 +00:00
Tim Kientzle
d906209e53 Merge r1021 from libarchive.googlecode.com:
If we know it's a socket, say so.
2009-04-27 18:35:03 +00:00
Tim Kientzle
7ad21ca8c3 Merge r1052,r1055 from libarchive.googlecode.com:
Clear the error flag on entry to a few more API functions.
2009-04-27 18:33:08 +00:00
Tim Kientzle
01a94543e9 Merge r1053,r1055,r1056,r1057,r1065 from libarchive.googlecode.com:
* Fix parsing of POSIX.1e ACLs from Solaris tar archives
 * Test the above
 * Preserve the order of POSIX.1e ACL entries
 * Update tests whose results depended on the order of ACL entries
 * Identify NFSv4 ACLs in Solaris tar archives and warn that
   they're not yet supported. (In particular, don't try to parse
   them as POSIX.1e ACLs.)

Thanks to: Edward Napierala sent me some Solaris 10 tar archives to test
2009-04-27 18:27:54 +00:00
Tim Kientzle
3257d55783 Merge r988,r1064 from libarchive.googlecode.com:
* Split whiny skip function to create a new best-effort skip_lenient()
 * Correctly increment the top-level file position only for the top filter
 * Simulate skip by reading against the current filter, not the top filter

The latter two bugs aren't currently visible because no existing
filter delegates skip operations.
2009-04-27 17:42:02 +00:00
Tim Kientzle
d21d99e07e Reading an mtree file is supposed to provide
access to the file data (if the file exists on
disk).  This was broken for the first regular
file; fix it and add a test so it won't break again.

In particular, this fixes the following idiom for creating
a tar archive in which every file is owned by root:

tar cf - --format=mtree . 	\
    | sed -e 's/uname=[a-z]*/uname=root/' -e 's/uid=[0-9]*/uid=0/' \
    | tar cf - @-
2009-04-26 18:57:50 +00:00
Tim Kientzle
9a4ac3e81e Various improvements to the tar.5 manpage, including
descriptions of the GNU tar "posix-style" sparse format,
clarification of the Solaris tar ACL storage,
and a few comments about Mac OS X tar's resource storage.
2009-04-26 18:46:40 +00:00
Tim Kientzle
6388433b62 Exit with ARCHIVE_FATAL if the ISO image is truncated. 2009-04-26 18:43:49 +00:00
Tim Kientzle
c49388ad34 Remove an unused variable.
Thanks to:	Christoph Mallon
2009-04-26 18:24:14 +00:00
Edward Tomasz Napierala
5d8532a1b1 Fix typo. 2009-04-26 10:12:20 +00:00
Christian Brueffer
2a72feb42b Correct the information about when the respective functionality first
appeared in FreeBSD.

PR:		133785
Submitted by:	Ulrich Spoerlein <uqs@spoerlein.net>
MFC after:	3 days
2009-04-23 08:37:56 +00:00
Maksim Yevmenkin
78b96635e6 Implement low-level Bluetooth HCI API.
This should make it easier to make Linux BlueZ libhci port.

Reviewed by:	Iain Hibbert < plunky -at- rya-online -dot- net > of NetBSD
MFC after:	1 week
Inspired by:	Linux BlueZ
Inspired by:	NetBSD
2009-04-22 15:50:03 +00:00
Robert Watson
d1f2f1c3f3 Now that the kernel defines CACHE_LINE_SIZE in machine/param.h, use
that definition in the custom locking code for the run-time linker
rather than local definitions.

Pointed out by:	tinderbox
MFC after:	2 weeks
2009-04-19 23:02:50 +00:00
Robert Watson
c0020399a6 Merge OpenBSM 1.1 from OpenBSM vendor branch to head.
OpenBSM history for imported revision below for reference.

MFC after:      2 weeks
Sponsored by:   Apple, Inc.
Obtained from:  TrustedBSD Project

OpenBSM 1.1

- Change auditon(2) parameters and data structures to be 32/64-bit architecture
  independent.  Add more information to man page about auditon(2) parameters.
- Add wrapper functions for auditon(2) to use legacy commands when the new
  commands are not supported.
- Add default for 'expire-after' in audit_control to expire trail files when
  the audit directory is more than 10 megabytes ('10M').
- Interface to convert between local and BSM fcntl(2) command values has been
  added:  au_bsm_to_fcntl_cmd(3) and au_fcntl_cmd_to_bsm(3), along with
  definitions of constants in audit_fcntl.h.
- A bug, introduced in OpenBSM 1.1 alpha 4, in which AUT_RETURN32 tokens
  generated by audit_submit(3) were improperly encoded has been fixed.
- Fix example in audit_submit(3) man page.  Also, make it clear that we want
  the audit ID as the argument.
- A new audit event class 'aa', for post-login authentication and
  authorization events, has been added.
2009-04-19 16:17:13 +00:00
Tim Kientzle
f4f5e3f5b9 Rely on OpenSSL bits only if we're building a system with OpenSSL.
Also, adjust the MD5 calls to rely on libmd instead of libcrypto,
so we keep MD5 support even in the !OpenSSL case.
2009-04-18 06:06:47 +00:00
Tim Kientzle
84cdfa5374 Correct and update the manpage to include
more details about some of the formats and
to briefly describe the mtree writing capability.
2009-04-18 03:47:29 +00:00
Tim Kientzle
400970912f Disabling the crypto bits should quiet tinderbox while I
track down the library dependencies that are screwing up the /rescue build.
2009-04-17 07:28:49 +00:00
Tim Kientzle
59fd3980b7 Publicize a handful of new functions and bump the version number
to indicate that this is synchronized with the recent libarchive 2.7.0
release.
2009-04-17 01:07:37 +00:00
Tim Kientzle
24a4c12895 Merge lots of test suite updates from libarchive.googlecode.com. 2009-04-17 01:06:31 +00:00
Tim Kientzle
7523935ae4 FreeBSD has a lot of crypto functions used by the recent mtree writer updates. 2009-04-17 01:04:23 +00:00
Tim Kientzle
50cc11da04 Ensure that the option setters return OK (option used) even
for options that don't change the list of keywords.
2009-04-17 01:03:52 +00:00
Tim Kientzle
c190973e9d Fix a memory leak: Release the current list of /set keywords
even when we exit on an error.
2009-04-17 01:02:56 +00:00
Tim Kientzle
7ea8a85dbc Document the new read options interface and the new read_header2() call. 2009-04-17 01:02:12 +00:00
Tim Kientzle
a5e75fbb6c Dynamically size the buffer we pass to getgrgid_r() and getpwuid_r().
Keep the buffer in the cache object so we don't have to keep doing this.
2009-04-17 01:01:15 +00:00
Tim Kientzle
82ea3751d6 Don't match an empty file on a read error. 2009-04-17 01:00:11 +00:00
Tim Kientzle
b6a1f92f24 When pulling metadata from disk, lookup the user and group name at the same time. 2009-04-17 00:59:34 +00:00
Tim Kientzle
bfe2732de8 LZW bugfix: when we hit end-of-file, return an invalid code. 2009-04-17 00:58:44 +00:00
Tim Kientzle
bf89aeae5e Minor fix: some platforms require both inttypes.h and stdint.h. 2009-04-17 00:57:11 +00:00
Tim Kientzle
06f39cd345 Implement command-line fallbacks for gzip and bzip2 decompression as well.
Not an issue for FreeBSD, since the base system has the necessary libraries.
Since all decompressors are always available now, we can unconditionally
enable them in archive_read_support_compression_all().
2009-04-17 00:55:52 +00:00
Tim Kientzle
c9f05bc8a1 Merge new xz/lzma support from libarchive.googlecode.com.
Since FreeBSD doesn't have liblzma in the base system, the
read side will always fall back to the unxz/unlzma commands for now.
(Which will in turn fail if those commands are not currently
installed.)  The write side does not yet have a fallback, so
that will just fail.
2009-04-17 00:54:35 +00:00
Tim Kientzle
a9ba4adfa5 Don't use the open callback, which is deprecated (because it's
never necessary).  Also, simplify just a tad by delegating
to read_open_fd() when we know the file descriptor, instead
of duplicating that logic.
2009-04-17 00:50:00 +00:00
Tim Kientzle
1787611dd1 Accept empty options, add a new read_next_header2() which is more
efficient for some uses.
2009-04-17 00:47:16 +00:00
Tim Kientzle
9a81c0ba38 Properly clone and free the recently-added "sourcepath" field. 2009-04-17 00:45:47 +00:00
Tim Kientzle
5f8af33b11 Use thread-safe getgrnam_r() and getpwnam_r(); dynamically size
the buffer used by this.
2009-04-17 00:44:47 +00:00
Tim Kientzle
946733c26e Fix a minor memory leak. 2009-04-17 00:44:03 +00:00
Tim Kientzle
8952729381 Merge from libarchive.googlecode.com: Numerous fixes to the
write options handling, including documentation.
2009-04-17 00:42:45 +00:00
Tim Kientzle
625683944d Merge from libarchive.googlecode.com: If we're
given an empty filename, just invoke write_open_fd()
instead of re-implementing the code to use stdout.
2009-04-17 00:39:35 +00:00
Edward Tomasz Napierala
bab43bab0c There is no way for strmode(3) to append '+' if the file has ACL,
because there is no way to figure that out based on the file mode
itself.  Make the manual page match reality.
2009-04-14 11:39:56 +00:00
Tim Kientzle
73beb0d530 Re-enable backing up extended attributes, as the ZFS bug this
triggered seems to have been fixed by John Baldwin's commit
r189967.
2009-04-13 18:56:53 +00:00
Robert Watson
a14e812168 Sort man page cross references by section, no need for a comma after the
last cross reference.

MFC after:	3 days
2009-04-13 18:32:26 +00:00
Tim Kientzle
cc2a51aaf7 Merge from libarchive.googlecode.com r791, r879, r884, r948: Various
fixes to read_support_compression_program.  In particular, failure of
the external program is detected a lot earlier, which gives much more
reasonable error handling.
2009-04-12 05:47:23 +00:00
Tim Kientzle
056e26b45e Thanks to Christoph Mallon for pointing out the dead variable here.
Also, rework this a little to make the logic excruciatingly clear.
2009-04-12 05:38:35 +00:00
Tim Kientzle
e2421f7667 Merge from libarchive.googlecode.com: Mostly a bunch of
corrections to the Windows support to reconcile differences
between Visual Studio and Cygwin.  Includes parts of
revisions 757, 774, 787, 815, 817, 819, 820, 844, and 886.

Of particular note, r886 overhauled the UTF-8/Unicode conversions to
work correctly regardless of whether the local system uses 16-bit
or 32-bit wchar_t.  (I assume that systems with 16-bit wchar_t
use UTF-16 and those with 32-bit wchar_t use UCS-4.)  This revision
also added a preference for wcrtomb() (which is thread-safe) on
platforms that support it.
2009-04-12 05:33:34 +00:00
Tim Kientzle
e1089c1e0c Merge from libarchive.googlecode.com r756,r761:
Document the new archive_read_disk API.
2009-04-12 05:04:02 +00:00
Tim Kientzle
f8c35626c4 Merge from libarchive.googlecode.com:
r751: Change __archive_strncat() to use a void * source, which reduces
the amount of casting needed to use this with "char", "signed char"
and "unsigned char".
r752: Use additions instead of multiplications when growing buffer;
faster and less chance of overflow.
2009-04-12 04:59:11 +00:00
Tim Kientzle
0da7a22640 Merge r881 from libarchive.googlecode.com: The "empty" format
should not be recognized if there is a read error.
2009-04-12 04:45:40 +00:00
Ed Maste
14846f9b49 Include a space between "send" and "broadcast". 2009-04-09 20:57:35 +00:00
Edward Tomasz Napierala
5174a6a262 Add wide character variants of string manipulations routines to 'SEE ALSO'.
Approved by:	rwatson (mentor)
2009-04-07 13:42:53 +00:00
Marcel Moolenaar
a5a8dffc5b Add support for PowerPC kernel core files. This commit only adds
support for virtual core files (aka minidumps). physical core
files are not supported.

The implementation is cross-tool ready and can be used in a non-
powerpc hosted debugger to analyze PowerPC core files. It also
accepts core files that still have the dump header, as can be
the case within Juniper where TFTP-based kernel core files are
supported and savecore is not used to "extract" the core file
from some dump device.

Obtained from:	Juniper Networks, Inc.
2009-04-06 21:52:10 +00:00
David Schultz
6685ac34d9 Return -1 instead of 0 upon reaching EOF. This is somewhat ill-advised
because it means getdelim() returns -1 for both error and EOF, and
never returns 0. However, this is what the original GNU	implementation
does, and POSIX inherited the bug.

Reported by:	marcus@
2009-04-06 13:50:04 +00:00
Andrew Thompson
dc8f21bc49 MFp4 //depot/projects/usb@159934
Update libusb function descriptions.

Submitted by:	Chuck Robey
2009-04-05 18:30:24 +00:00
Tim Kientzle
4ef9925138 Temporary hack to unbreak user/group lookups;
use a larger buffer for getpwuid_r/getgrgid_r.
This needs to be dynamically sized.
2009-04-04 20:08:08 +00:00
Konstantin Belousov
c8da4f07d7 Allow the NULL, RTLD_SELF and RTLD_NEXT handles to work with dlfunc(3).
dlfunc() called dlsym() to do the work, and dlsym() determines the dso
that originating the call by the return address. Due to this, dlfunc()
operated as if the caller is always the libc.

To fix this, move the dlfunc() to rtld, where it can call the internal
implementation of dlsym, and still correctly fetch return address.
Provide usual weak stub for the symbol from libc for static binaries.
dlfunc is put to FBSD_1.0 symver namespace in the ld.so export to
override dlfunc@FBSD_1.0 weak symbol, exported by libc.

Reported, analyzed and tested by:	Tijl Coosemans <tijl ulyssis org>
PR: standards/133339
Reviewed by:	kan
2009-04-03 19:17:23 +00:00
Xin LI
9b4dadd3e0 Properly handle malloc() failures.
PR:		bin/83338
2009-04-02 22:17:02 +00:00
Xin LI
985a73f6d3 Remove a warning which is supposed to have been removed on 20030301. 2009-04-02 21:51:54 +00:00
Xin LI
06f535757c Bail out when memory allocation is failed, rather than referencing
a NULL pointer.

PR:		kern/94480
Submitted by:	Michiel Pelt <m.pelt xs4all nl>
2009-04-02 17:16:39 +00:00
John Baldwin
1c52c37eae Properly update the shm_open/shm_unlink symbol versioning metadata after
these functions were moved into the kernel:
- Move the version entries from gen/ to sys/.  Since the ABI of the actual
  routines did not change, I'm still exporting them as FBSD 1.0 on purpose.
- Add FBSD-private versions for the _ and __sys_ variants.
2009-04-02 15:53:29 +00:00
Konstantin Belousov
8b61c10e48 Unconditionally build wrappers for i386_get_ioperm(), i386_set_ioperm(),
i386_get_ldt() and i386_set_ldt().

In collaboration with:	pho
Reviewed by:	jhb
2009-04-01 19:23:46 +00:00
Konstantin Belousov
b2e4ce45d9 Document RTLD_NODELETE, -z nodelete and -z origin support. 2009-04-01 14:38:20 +00:00
John Baldwin
b0d8ed7ad3 Fix an off-by-one buffer overflow in ngets().
Submitted by:	Bruce Can
MFC after:	1 month
2009-03-31 14:30:46 +00:00
David Xu
35c608253d Turn on nodelete linker flag because libthr can not be unloaded safely,
it does hook on to libc.
2009-03-31 02:50:18 +00:00
Hajimu UMEMOTO
bc42149220 Query DNS only once per an address family.
Obtained from:	KAME
MFC after:	2 weeks
2009-03-29 17:55:11 +00:00
Xin LI
e8ee08bad8 Add some casts to silence compiler warning about signedness. 2009-03-28 07:44:08 +00:00
Xin LI
9fc74a871c Minor changes from Berkeley DB 1.86 and further improvements from OpenBSD.
This does not include the new hash routines since they will cause problems
when reading old hash files.

Since mpool(3) has been changed, provide a compatibility shim for older
binaries.

Obtained from:	OpenBSD
2009-03-28 07:31:02 +00:00
Xin LI
73590c342a Allow O_SYNC and O_NOFOLLOW flags in dbopen().
Obtained from:	OpenBSD
2009-03-28 07:26:00 +00:00
Xin LI
6c90d46ee5 Plug memory leaks and a potential NULL dereference.
Obtained from:	OpenBSD
2009-03-28 07:20:39 +00:00
Xin LI
edcdc752ec Simplify the logic when determining whether to zero out a db file to after
open().  The previous logic only initializes the database when O_CREAT is
set, but as long as we can open and write the database, and the database
is empty, we should initialize it anyway.

Obtained from:	OpenBSD
2009-03-28 07:09:51 +00:00
Xin LI
a47fc82519 - If (keysize+datasize)%(bsize=14)==0, insertion of a `big key' would cause
an invariant (actually, an ugly hack) to fail, and all Hell would break
   loose.

   When deleting a big key, the offset of an empty page should be bsize, not
   bsize-1; otherwise an insertion into the empty page will cause the new key to
   be elongated by 1 byte.

   Make the packing more dense in a couple of cases.

 - fix NULL dereference exposed on big bsize values;

Obtained from:	NetBSD via OpenBSD
2009-03-28 06:47:05 +00:00
Xin LI
4524c90576 Avoid NULL deference which causes DEBUG1 to crash, not to print useful
information.

Obtained from:	OpenBSD
2009-03-28 06:40:48 +00:00
Xin LI
89bc741f77 - Avoid overwriting the cursor page when the cursor page becomes the
LRU page.
 - Fix for sequential retrieval failure when using large key/data pairs.

Obtained from:	OpenBSD
2009-03-28 06:38:31 +00:00
Xin LI
213bceeead Fix a crash when iterating over a hash and removing its elements.
Obtained from:	OpenBSD
2009-03-28 06:30:43 +00:00
Xin LI
3130c353f8 Only squeeze a short key/value pair onto a page with other complete key/value
pairs, not onto a page containing the end of a big pair.

Obtained from:	NetBSD via OpenBSD
2009-03-28 06:25:33 +00:00
Xin LI
b115f257ba Diff reduce against OpenBSD, no functional change. 2009-03-28 06:23:10 +00:00
Xin LI
a53e89e3a1 Return meaningful errno in overflow case; print error message to stderr
in one more case.

Obtained from:	NetBSD via OpenBSD
2009-03-28 06:12:39 +00:00
Xin LI
d3b2afad1b Use pread(2) and pwrite(2) instead of lseek(2) + read(2) / write(2).
Obtained from:	NetBSD via OpenBSD
2009-03-28 06:05:53 +00:00
Xin LI
02d7f710b8 db/btree/bt_open.c: check return value of snprintf() and return value
if the result is truncated.

db/hash/hash_page.c: use the same way to create temporary file as
bt_open.c; check snprintf() return value.

Obtained from:	OpenBSD
2009-03-28 05:57:27 +00:00
Xin LI
f60486b3ce Several signed/unsigned warning fixes. 2009-03-28 05:45:29 +00:00
Xin LI
c9f30aaaf7 When allocating memory, zero out them if we don't intend to overwrite them
all; before freeing memory, zero out them before we release it as free
heap.  This will eliminate some potential information leak issue.

While there, remove the PURIFY option.  There is a slight difference between
the new behavior and the old -DPURIFY behavior, with the latter initializes
memory with 0xff's.  The difference between old and new approach does not
generate observable difference.

Obtained from:	OpenBSD (partly).
2009-03-28 04:00:46 +00:00
Diomidis Spinellis
15ced2cfb3 Document missing requests. 2009-03-27 11:03:02 +00:00
Hajimu UMEMOTO
4d75630780 Add support for SCTP to getaddrinfo(3).
Now, getaddrinfo(3) returns two SOCK_STREAMs, IPPROTO_TCP and
IPPROTO_SCTP.  It confuses some programs.  If getaddrinfo(3) returns
IPPROTO_SCTP when SOCK_STREAM is specified by hints.ai_socktype, at
least Apache doesn't work.  So, I made getaddrinfo(3) to return
IPPROTO_SCTP with SOCK_STREAM only when IPPROTO_SCTP is specified
explicitly by hints.ai_protocol.

PR:		bin/128167
Submitted by:	Bruce Cran <bruce__at__cran.org.uk> (partly)
MFC after:	2 week
2009-03-25 16:23:43 +00:00
Alexander Leidinger
c5f562d25a Improve the German translation.
Some parts (ERANGE, ETXTBSY) triggered by Christoph Mallon.

Discussed with:	brueffer, gabor (previous version)
2009-03-25 12:36:37 +00:00
Gabor Kovesdan
fa332705da - Add Belarusian catalog
PR:		conf/133004
Submitted by:	Tatsiana Elavaya <t.elavaya@gmail.com>
2009-03-24 23:31:41 +00:00
Fabien Thomas
c2a3620fc3 Allow compile from c++ for libpmc
Approved by:	jkoshy (mentor)
MFC after:	3 days
2009-03-24 22:35:05 +00:00
Hajimu UMEMOTO
d53978e3c0 getaddrinfo(3) should accept numeric when ai_socktype is not
specified in hint or hints is NULL.

PR:		bin/51827
Submitted by:	Mark Andrews <marka__at__isc.org>
MFC after:	1 week
2009-03-24 17:47:24 +00:00
Xin LI
6c0af71bdc Save errno before calling _close(), which may clear it.
Obtained from:	OpenBSD
2009-03-23 23:43:07 +00:00
Xin LI
7efabbb915 use more proper format string.
Obtained from:	NetBSD via OpenBSD
2009-03-23 23:22:09 +00:00
Konstantin Belousov
2e92f03abd 7.2 will be the first release where strndup() appears.
Submitted by:	Florian Smeets <flo kasimir com>
MFC after:	3 days
2009-03-22 15:29:12 +00:00
Rui Paulo
79df44667c Fix typo in comment. 2009-03-22 01:24:32 +00:00
Rui Paulo
919b495ca7 Install the new headers. 2009-03-22 01:06:39 +00:00
Rui Paulo
28510af555 Support files for new libpcap 1.0.0.
Includes a shlib bump.
2009-03-21 22:59:02 +00:00
Doug Barton
6b52fc0a79 Vendor import of BIND 9.4.3-P2 2009-03-21 21:37:05 +00:00
Maxim Konovalov
30905e0ffc o Spell. 2009-03-21 10:10:33 +00:00