Commit Graph

10839 Commits

Author SHA1 Message Date
Randall Stewart
42551e993f - Sysctl's move to seperate file
- moved away from ifn/ifa access to sctp_ifa/sctp_ifn
  built and managed by the add-ip code.
- cleaned up add-ip code to use the iterator
- made iterator be a thread, which enables auto-asconf now.
- rewrote and cleaned up source address selection (also
  made it use new structures).
- Fixed a couple of memory leaks.
- DACK now settable as to how many packets to delay as
  well as time.
- connectx() to latest socket API, new associd arg.
- Fixed issue with revoking and loosing potential to
  send when we inflate the flight size. We now inflate
  the cwnd too and deflate it later when the revoked
  chunk is sent or acked.
- Got rid of some temp debug code
- src addr selection moved to a common file (sctp_output.c)
- Support for simple VRF's (we have support for multi-vfr
  via compile switch that is scrubbed from BSD but we won't
  need multi-vrf until we first get VRF :-D)
- Rest of mib work for address information now done
- Limit number of addresses in INIT/INIT-ACK to
  a #def (30).

Reviewed by:	gnn
2007-03-15 11:27:14 +00:00
Robert Watson
e6a4641532 Fix a comment in memstat.h: errors are associated with memory type lists,
not individual types.

Submitted by:	Bryan Venteicher <bryanv at daemoninthecloset dot org>
MFC after:	3 days
2007-03-15 10:44:18 +00:00
Tim Kientzle
22976ba40a When ARCHIVE_EXTRACT_UNLINK is requested:
* Only try to remove the existing item if we're not restoring a directory.
  * If unlink fails, try rmdir next.
This should fix the broken --unlink option in bsdtar.

Thanks again to: Kris Kennaway, for beating up bsdtar on pointyhat.
2007-03-13 06:04:24 +00:00
Stefan Farfeleder
f9ff2f8ffb Merge the following changes from NetBSD:
history.c 1.32:
  # Fix memory leak found by valgrind (Julien Torres)
map.c 1.24:
  # fix debugging printf format.
read.c 1.40:
  # Fix bug with multiple pending el_pushes. Reported by Julien Torres.
tty.c 1.24:
  # Coverity CID 1216: Prevent negative index use.

MFC after:	3 weeks
2007-03-11 21:47:40 +00:00
Stefan Farfeleder
e6de94e677 Merge the following changes from NetBSD:
chared.h 1.17, common.c 1.19, emacs.c 1.21, key.c 1.18, key.h 1.9, map.c 1.23,
term.c 1.42, term.h 1.17, vi.c 1.25:
  # Print the actual eofc, instead of ^D\b\b.
  # Change internal character decoding to prevent buffer oveflows.
key.c 1.19, key.h 1.10:
  # move declaration to header file.
term.c 1.43:
  # Coverity CID 806: Prevent NULL deref
term.c 1.44:
  # Coverity CID 1668: Plug memory leak.
term.c 1.45:
  # Fix compilation.

MFC after:	3 weeks
2007-03-11 18:30:22 +00:00
Tim Kientzle
2304493774 Libarchive 2.0.23:
* The ACL formatter was mis-formatting entries which had a
     user/group ID but no name.  Make the parser tolerant of
     these, so that old archives can be correctly restored;
     fix the formatter to generate correct entries.
   * Fix overwrite detection by introducing a new "FAILED" return
     code that indicates the current entry cannot be continued
     but the archive as a whole is still sound.
   * Header cleanup:  Remove some unused headers, add some that
     are required with new Linux systems.
2007-03-11 10:29:52 +00:00
Stefan Farfeleder
370bf6653c Merge changes to the NetBSD copyright (advertising clause removal). 2007-03-11 08:41:01 +00:00
Bruce M Simpson
fd46d76ecf Wordsmithery.
Pointed out by:	ru
2007-03-09 19:43:42 +00:00
Rong-En Fan
31b4134f7b Enable ncurses wide character support
Approved by:	delphij (mentor)
Tested by:	kris on pointyhat (early version), current@
2007-03-09 12:11:58 +00:00
Rong-En Fan
557158de64 - style.Makefile(9) fix
- first line is $FreeBSD$
  - Reorder special variables: DPADD, LPADD, CFLAGS
  - Use = instead of += for variables that are initially empty
  - Use space instead of tab after :
  - Use one tab after =
- Use .SUFFIXES for section 3 manual page which simplifies Makefile a lot
- Use SHAREDIR instead of /usr/share
- Remove SRCDIR in INCS since we set .PATH properly
- Use plural in variable name when it stands for more that one source file

Reviewed by:	ru
Approved by:	delphij (mentor)
2007-03-09 09:54:07 +00:00
Bruce M Simpson
7b7b32179e Document SO_ACCEPTCONN.
Submitted by:	Vlad GALU (with changes)
MFC after:	3 days
2007-03-08 12:57:12 +00:00
Tim Kientzle
d4c6c416dc New tests for system-independent ACL support.
These tests verify that archive_entry objects can store and return
ACL data and that pax format archives can read and write ACL
information.  These do not (yet) test that ACL data is read or
written to disk correctly.  (And hence would not have caught the
recent snafu about ACL read-from-disk being turned off.)
2007-03-08 06:09:27 +00:00
Tim Kientzle
19dd89364c Distinguish between the end of ACL data and an error in pulling
ACL data from the archive entry.  This doesn't impact
archive_read_extract or archive_write_disk since they only
check for != ARCHIVE_OK when calling this function.  (Though
they should be more careful.)
2007-03-08 06:07:07 +00:00
Joseph Koshy
dad626cccb Add GELF_* accessor macros.
Prodded by:	Sam Arun Raj <samarunraj at gmail dot com>
2007-03-08 04:01:30 +00:00
Bruce M Simpson
9dba3fec85 Fix license. Clause 4 is still required (UCB materiel).
Submitted by:	rwatson
Pointy hat to:	bms
2007-03-07 13:38:11 +00:00
Bruce M Simpson
13f35fd9be use 2-clause BSD license as per hoskins strike-off july 22 1999.
use wording of FreeBSD License.
2007-03-07 11:06:46 +00:00
John Baldwin
5e41bd2cd2 Only reject file descriptors higher than FD_SETSIZE if we are not using
poll(2) or kqueue(2).  Previously we rejected fd's higher than FD_SETSIZE
for kevent(2), and larger than sysconf(_SC_OPEN_MAX) for poll(2).  However,
the check for poll(2) wasn't really needed.  open(2) and socket(2) won't
return an fd you can't pass to either poll(2) or kevent(2).  This fixes
a but where gethostbyname() would fail if you had more than 1023 files
open in a process.

MFC after:	1 week
Reviewed by:	ume
Found by:	ps
2007-03-05 19:39:51 +00:00
Brian Somers
d5d9eb5095 Oops, fix a typo in the last commit :-/ 2007-03-05 19:00:49 +00:00
Brian Somers
ee12856f1d In the NOTYET code path when a process forks, the remaining
child thread goes back to system scope rather than process
scope.  This allows an ensuing exec() to actually work.

This change was made a year ago here, but I "forgot" to
commit it :(

Approved by:	deischen
MFC after:	3 weeks
2007-03-05 17:47:27 +00:00
Ruslan Ermilov
ff91121ada Apply my patch properly. 2007-03-05 15:44:00 +00:00
Bruce M Simpson
693099c53f Fix markup.
Submitted by:	ru
MFC after:	2 days
2007-03-05 13:52:01 +00:00
Bruce M Simpson
491deb49c4 .Xr nit.
Submitted by:	brueffer
2007-03-05 12:54:03 +00:00
Bruce M Simpson
4802040ebf Update shutdown() manual page to reflect actual behaviour of code.
Add IMPLEMENTATION NOTES section explaining in detail the effect this
system call has in common use cases involving PF_INET and PF_INET6 sockets.

PR:		kern/84761
MFC after:	2 days
2007-03-05 12:39:53 +00:00
Xin LI
2f1b6e8bb5 Test cases for back references.
Obtained from:	OpenBSD
2007-03-05 09:44:41 +00:00
Xin LI
082063a051 Only stop evaluation of a back reference if the match length is
zero and the recursion level is too deep.

Obtained from:	OpenBSD
2007-03-05 09:43:55 +00:00
Xin LI
0f4481c5e4 Avoid infinite recursion on:
echo "foo foo bar bar bar baz" | sed 's/\([^ ]*\)\( *\1\)*/\1/g'

Obtained from:	OpenBSD via NetBSD (rev. 1.18)
2007-03-05 03:07:36 +00:00
Simon L. B. Nielsen
3dd425f70b Disable RPC exponential back-off for FreeBSD.org systems (IE. hidden
behind _FREEFALL_CONFIG).  This is done mainly to make NIS even more
resistant to packet loss.

This is not enabled by default for "normal" FreeBSD since it might cause
the server providing the RPC service to be hit heavily with RPC traffic
in case of problems.  freefall.FreeBSD.org and hub.FreeBSD.org have been
running with a patch similar to this for a couple of weeks.

MFC after:	1 week
Discussed with:	peter
2007-03-04 12:25:03 +00:00
Simon L. B. Nielsen
2861f68d48 - Bump _yplib_timeout limit from 10 to 20 seconds to better handle
packet loss when talking to a NIS server.
- Set 1 second retry timeout to further realistically handle UDP
  packet loss for yp_next packet bursts.  If the packet hasn't come
  back within 1 second its rather unlikely to come back at all.  There
  is still back-off mechanism in RPC so if there is another reason
  than packet loss for the lack of response within 1 second, the NIS
  server will not be totally bombarded with requests.

This reduces the risk of NIS failing with:

     yp_next: clnt_call: RPC: Timed out

considerably.  This is mainly a problem if you have larger NIS maps
(like at FreeBSD.org) since enumerations of the lists will cause a UDP
packet bursts where a few packets being lost once in a while do
happen.

MFC after:	1 week
Discussed with:	peter
Problem mainly diagnosed by:	peter
2007-03-04 10:30:43 +00:00
Tim Kientzle
f81da3e584 libarchive 2.0
* libarchive_test program exercises many of the core features
  * Refactored old "read_extract" into new "archive_write_disk", which
    uses archive_write methods to put entries onto disk.  In particular,
    you can now use archive_write_disk to create objects on disk
    without having an archive available.
  * Pushed some security checks from bsdtar down into libarchive, where
    they can be better optimized.
  * Rearchitected the logic for creating objects on disk to reduce
    the number of system calls.  Several common cases now use a
    minimum number of system calls.
  * Virtualized some internal interfaces to provide a clearer separation
    of read and write handling and make it simpler to override key
    methods.
  * New "empty" format reader.
  * Corrected return types (this ABI breakage required the "2.0" version bump)
  * Many bug fixes.
2007-03-03 07:37:37 +00:00
Joseph Koshy
b309c34bb2 Fix a typo.
Submitted by:	 Kai Wang <kaiw27 at gmail dot com>
2007-03-03 06:13:38 +00:00
Tim Kientzle
03bb132ddc Force the umask to something predictable while creating objects
on disk.  In particular, this fixes tar -xp restore of mode bits.
2007-03-02 16:44:58 +00:00
Tim Kientzle
6fccc5ecd4 Because the buffer gets released immediately, I need to
copy the symlink target name, not just copy the reference.
This problem sometimes caused crashes when extracting
symlinks from ISO9660 images.

Thanks to: Diego "Flameeyes" Pettenò
2007-03-01 06:22:34 +00:00
Bruce M Simpson
160a2e5504 Document the AF_LINK extension which was imported from NetBSD. 2007-02-28 21:28:33 +00:00
Bruce M Simpson
67228c4621 Nuke ascii2addr() and addr2ascii(). They have no consumers anywhere
in FreeBSD, and originated from INRIA IPv6.

Stub out netstat reference to addr2ascii() I mistakenly introduced.
Update misleading man page sections.

Merge NetBSD's getnameinfo() AF_LINK extensions for a portable way to
print link-layer addresses given a sockaddr_dl(), minus the IEEE 1394
bits which don't map directly to our code.

Obtained from:	NetBSD (getnameinfo.c)
Discussed on:	current (March 2006)
2007-02-28 21:18:38 +00:00
Ruslan Ermilov
66fd908b84 Remove a (harmless) stray backslash. 2007-02-27 16:13:19 +00:00
Nick Hibma
f30112ba16 Make hosts.allow point to hosts_options instead.
Requested by: 	ru
2007-02-27 14:22:07 +00:00
Randall Stewart
7c3768006d Fix include declaration it was sys/sctp.h should be netinet/sctp.h,
reported by pluknet@gmail.com.
2007-02-26 12:23:32 +00:00
Robert Watson
158ae6cdf2 Mark data structures used on the wire with IPX SAP as __packed so that
they are not inappropriately padded as a result of compiler changes.

PR:		kern/74105
Submitted by:	Bob Johnson <bob89 at eng dot ufl dot edu>
2007-02-26 12:07:08 +00:00
Tim Kientzle
4813511138 Move _posix1e_acl_name_to_id out of acl_support.c and into
acl_from_text.c.  Since acl_from_text.c is the only place it
is used, we can now make this internal utility function "static."

As a bonus, acl_set_fd() no longer pulls in getpwuid() for no reason.

MFC after: 7 days
2007-02-26 02:07:02 +00:00
Tim Kientzle
0031cdf4d7 Don't assert() the TLS allocation requested is big enough; just
fix the argument.

In particular, this is a step towards breaking crt1's dependence on stdio.
2007-02-25 21:23:50 +00:00
Jason Evans
a326064e24 Modify chunk_alloc() to prefer mmap()ed memory over sbrk()ed memory.
This has no impact unless USE_BRK is defined (32-bit platforms), in
which case user allocations are allocated via mmap() if at all possible,
in order to avoid the possibility of unreclaimable chunks in the data
segment.

Fix an obscure bug in base_alloc() that could have allowed undefined
behavior if an application were to use sbrk() in conjunction with a
USE_BRK-enabled malloc.
2007-02-22 19:10:30 +00:00
Randall Stewart
2cbcccc774 Fixes build breakage.. invalid type casts.. and invalid
type for size in one place.
2007-02-22 14:48:12 +00:00
Randall Stewart
d8b5fd91b9 First cut of the sctp man pages. Still need work. 2007-02-22 14:32:39 +00:00
Randall Stewart
2c0d559d1e Fixes __FreeBSD__ being present (they should not)
and also trailing garbage on undef of magic numbers.
2007-02-22 13:39:57 +00:00
Randall Stewart
804cf64147 Adds a performance improvement for when sctp_sendx is
called with only one address, we then can call the
generic system call. Also fixes some socket api
type issues and cleans up the "magic" numbers that
were being used in the code.

Reviewed by:	gnn
2007-02-22 12:42:43 +00:00
Jean-Sébastien Pédron
2483dd1389 Fix a bug with the release of section's raw data. Both release loops
were using translated data linked list, leading to a memory leak.

Jkoshy's testsuite was used to check for non-regression.
2007-02-21 08:14:22 +00:00
Nick Hibma
85fea78497 Create a link from hosts.allow(5) hosts_access(3), to give the user a
starting point for more information on a file in /etc.

MFC after:	1 week
2007-02-20 23:12:04 +00:00
Tom Rhodes
13d8c69070 Fix mis-reference of incorrect manual page in ERRORS section.
Noticed by:	Harlan Stenn <stenn@ntp.isc.org>
2007-02-17 01:54:00 +00:00
Tom Rhodes
0e37c3dc33 Hook ypclnt.3 up to the build. 2007-02-15 02:43:14 +00:00
Tom Rhodes
86eaa31f67 Add a ypclnt.3 manual page referenced by various other YP based manual pages.
PR:		108980
Obtained from:	OpenBSD (minimal changes for mdoc(7) style)
2007-02-15 02:40:31 +00:00