Commit Graph

6682 Commits

Author SHA1 Message Date
Bill Fenner
8497092d00 Up WARNS to 3 if not building with crypto.
Approved by:	des
2002-10-28 01:41:28 +00:00
Garrett Wollman
c9885518de Create a small library function, check_utility_compat(3), to determine
whether a named utility should behave in FreeBSD 4.x-compatible mode
or in a standard mode (default standard).  The configuration is done
malloc(3)-style, with either an environment variable or a symlink.

Update expr(1) to use this new interface.
2002-10-28 00:15:43 +00:00
Garrett Wollman
188c541ceb Update limits and configuration parameters for 1003.1/TC1/D6.
Implement new sysconf keys.  Change the implenentation of
_SC_ASYNCHRONOUS_IO in preparation for the next set of changes.

Move some limits which had been in <sys/syslimits.h> to <limits.h> where
they belong.  They had only ever been in syslimits.h to provide for the
kernel implementation of the CTL_USER MIB branch, which went away with
newsysctl years ago.  (There is a #error in <sys/syslimits.h> which I
will downgrade in the next commit.)
2002-10-27 18:03:02 +00:00
Garrett Wollman
688dfe4533 Do not include <sys/syslimits.h> directly; it is not intended for general
consumption.
2002-10-27 17:44:33 +00:00
Dag-Erling Smørgrav
1a5424b137 Slight amendment to rev 1.34: instead of considering any short read an
error, only report an error if no data was read at all (unless len was
0 to start with).  Otherwise, the final read of practically any transfer
will end in a fatal error.
2002-10-27 17:20:49 +00:00
Dag-Erling Smørgrav
2761348f78 Introduce _fetch_writev(), which is the conn_t version of writev(2). In
the SSL case, it is no different from the old _fetch_write(), but in the
non-SSL case it uses writev(2) to send the entire vector as a single
packet (provided it can fit in one packet).  Implement _fetch_write()
and _fetch_putln() in terms of _fetch_writev().

This should improve performance in the non-SSL case (by reducing protocol
overhead) and solve the problem where too-smart-for-their-own-good
firewalls reject FTP packets that do not end in CRLF.

PR:		bin/44123
Submitted by:	fenner
2002-10-27 16:11:21 +00:00
Dag-Erling Smørgrav
9f788e9c90 Eliminate two cases of undefined behaviour: total in _fetch_write() was
not initialized before use, and _http_growbuf() did not return a value
on success.

Reported by:	Peter Edwards <pmedwards@eircom.net>
MFC after:	2 weeks
2002-10-27 15:43:40 +00:00
Dag-Erling Smørgrav
e24f60e74f Back out the previous commit, and fix the bug rather than try to hide its
symptoms: make timeouts and short transfers fatal, and set errno to an
appropriate value (ETIMEDOUT for a timeout, EPIPE for a short transfer).

MFC after:	2 weeks
2002-10-27 15:08:21 +00:00
Tim J. Robbins
b6f33850e0 Style sweep. 2002-10-27 10:41:21 +00:00
Peter Wemm
7e50af21ba Add back ia64 support that was removed in the last few revisions.
I've cloned write_ia64_disk.c from write_i386_disk.c.
2002-10-27 00:21:02 +00:00
Hajimu UMEMOTO
ddb2984b5d query ip6.arpa then ip6.int for IPv6 reverse lookup. follows RFC3152.
MFC after:	5 days
2002-10-26 19:00:14 +00:00
Alexey Zelkin
1f1e884a91 Add & hookup manpage for pthread_attr_get_np(3).
MFC after:	3 days
2002-10-26 15:04:29 +00:00
Alexey Zelkin
cab33357a5 Hook uthread_attr_get_np.c to build 2002-10-26 13:55:35 +00:00
Alexey Zelkin
6dc0be5f9f Add pthread_attr_get_np() function. This is FreeBSD non-portable POSIX threads
extenston function. It supposed to provide facility to get already created
thread's attributes. Looks like it's last thing we need to make JDK's Hotspot
building without requirement to have source tree.

Reviewed by:	deischen
MFC after:	3 days
2002-10-26 13:53:22 +00:00
Alexey Zelkin
64536616e6 Be more agresive on arguments' checking.
OK'ed by:	deischen
MFC after:	3 days
2002-10-26 13:47:06 +00:00
Hajimu UMEMOTO
a89c1d30b2 - scopeid is u_int32_t
- strtoul pedant.  pointed out by deraadt

Obtained from:	KAME
MFC after:	1 week
2002-10-25 17:07:02 +00:00
Hajimu UMEMOTO
dd521ef192 - kill strcpy
- port range check need to be done before htons.  from deraadt
- %d/%u audit
- correct bad practice in the code - it uses two changing variables
  to manage buffer (buf and buflen).  we eliminate buflen and use
  fixed point (ep) as the ending pointer.
- use snprintf, not sprintf
- pass correct name into q.name.  from lukem@netbsd
- sync comment

Obtained from:	KAME
MFC after:	1 week
2002-10-25 16:24:28 +00:00
Tim J. Robbins
583efa1268 Use an internal buffer for the result when the first argument is NULL. 2002-10-25 13:24:45 +00:00
Tim J. Robbins
79db40061f The ORIENTLOCK macro is no longer needed since all functions use
FLOCKFILE/FUNLOCKFILE explicitly.
2002-10-25 07:01:56 +00:00
Nate Lawson
13cc1c8394 The FTP connection caching needs a better interface -- connections are
closed through _fetch_close() which is the only one who knows the connection
REALLY was closed (since ref -> 0).  However, FTP keeps its own local
cached_connection and checks if it is valid by comparing it to NULL.  This
is bogus since it may have been freed elsewhere by _fetch_close().

This change checks if we are closing the cached_connection and the ref is 1
(soon to be 0).  If so, set cached_connection to NULL so we don't
accidentally reuse it.  The REAL fix should be to move connection caching
to the common.c level (_fetch_* functions) and NULL the cache(s) in
_fetch_close().  Then all layers could benefit from caching.
2002-10-25 01:17:32 +00:00
Andrew Gallatin
b49cf84452 #ifdef out assignToPartition on non x86 arches to unbreak the world
on alpha, sparc64 and ia64
2002-10-24 13:35:52 +00:00
Bruce Evans
74ed384d0d Restored sigaction's name in its prototype. 2002-10-24 13:03:46 +00:00
Sheldon Hearn
a7af55af93 * Modernize aio(4), providing instructions for static and dynamic kernel
linking.

* Fix disorder in the SEE ALSO sections of aio_*(2).

* Remove unnecessary cross-references from the SEE ALSO sections of
  aio_*(2); config(8), kldload(8) and kldunload(8) are cross-referenced
  from aio(4).

* Remove the KERNEL OPTIONS sections from aio_*(2), now that these
  pages cross-reference aio(4), which contains suitable kernel linking
  reference material.
2002-10-24 12:57:05 +00:00
Dag-Erling Smørgrav
47ae1efd8d Add cross-references to the aio(4) manual page.
Submitted by:	Craig Rodrigues <rodrigc@attbi.com>
2002-10-24 12:22:57 +00:00
Tim J. Robbins
fcd7f38f46 Replace wcsstr() with an implementation based on strstr(), which is far
more efficient. The problem with the previous implementation was that it
calculated the length of the first argument ("big") with wcslen() when
it was not necessary.
2002-10-24 02:53:45 +00:00
Tim J. Robbins
1707c9c3f5 Restore Berkeley SCCS id. 2002-10-24 02:48:45 +00:00
Tim J. Robbins
6f9ed74abc Remove the Standards section again until we get these functions sorted
out. This will probably have to wait until after 5.0-R.
2002-10-24 01:24:26 +00:00
Chris Costello
4bae1674ce Place mac_prepare() with the other mac_prepare*() functions. 2002-10-24 01:16:56 +00:00
Chris Costello
0d511a4ea7 mac_free() no longer accepts a void * parameter; only mac_t's are supposed
to be passed.  Point this out in a warning notice, which will eventually
go away, sometime between now and -RELEASE.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-10-24 01:01:29 +00:00
Chris Costello
3261668c1d Remove superfluous empty "FILES" section.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-10-23 23:56:15 +00:00
Chris Costello
b90b17d351 Remove hard sentence breaks.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-10-23 23:55:23 +00:00
Poul-Henning Kamp
d7e9a2ad8a More lobotomy:
remove CHUNK_BSD_COMPAT, it was a bad idea, and now its gone.
        remove DOSPTYP_ONTRACK, missed in OnTrack removal commit.
        unifdef -DHAVE_GEOM
make tst01 compile again.
2002-10-23 21:05:42 +00:00
Poul-Henning Kamp
943599b348 Remove another 10 mindless #ifdefs. 2002-10-23 20:35:42 +00:00
Poul-Henning Kamp
844c9bb884 Rely on sysctl kern.disks to be there, and get rid of one of the far too
many lists of disk device driver names in the system.  At this point
we should really get the names from the XML, but hey...
2002-10-23 20:15:10 +00:00
Poul-Henning Kamp
b485e51552 Remove unnecessary ioctls tickling kernel side to realize that we fiddled
with the disk.  GEOM will automatically retaste when we closet he filedesc.
2002-10-23 20:02:33 +00:00
Poul-Henning Kamp
532dd2fa86 Untangle #ifdefs in the write-end of things by giving each arch its
own file and own copy of WriteDisk() to do things in.

This should have happened years ago, instead of adding #ifdefs all
over the place.
2002-10-23 19:52:32 +00:00
Poul-Henning Kamp
56c0241de6 Separate the struct disklabel filling stuff from the rest of Write_FreeBSD(). 2002-10-23 19:32:18 +00:00
Mark Murray
bf2f52b5fa Remove duplicate declaration. 2002-10-23 17:35:11 +00:00
Mark Murray
d69d15193c Make the first argument of getbsize a size_t* instead of an int*, as this is what the quantity actually is. Fix an easy const while I'm here. 2002-10-23 14:18:07 +00:00
Yoshihiro Takahashi
7bec978084 - The GEOM system does not work on pc98.
- Fix to build w/o the HAVE_GEOM option.
2002-10-23 13:00:09 +00:00
Tim J. Robbins
fb22884400 Fix the NetBSD RCS id's on these files; somehow they were initially
committed with the tags unexpanded.
2002-10-23 11:08:40 +00:00
Tim J. Robbins
1eb0f442c7 Reimplement more efficiently, using a single forward scan (like strrchr(3))
instead of scanning forwards to find the end of the string then scanning
backwards to find the character.
2002-10-23 10:52:04 +00:00
Tim J. Robbins
ec23fdffc7 Reimplement, handling the case where c == L'\0' correctly and fixing
some style(9) bugs.
2002-10-23 10:47:47 +00:00
Poul-Henning Kamp
0bb035b962 Add the new extra argument also in the alpha case. 2002-10-23 10:47:00 +00:00
Hajimu UMEMOTO
aadad92276 query ip6.arpa then ip6.int for IPv6 reverse lookup. follows RFC3152.
Obtained from:	KAME
MFC after:	1 week
2002-10-23 10:45:09 +00:00
Tim J. Robbins
edafcb6d73 Add a Standards section, claiming conformance to IEEE Std. 1003.1-2001.
Also add a note to the Bugs section pointing out that strerror() and
perror() share the same static buffer.
2002-10-23 10:16:21 +00:00
Dag-Erling Smørgrav
02edf2208d Translate to English. 2002-10-23 08:55:14 +00:00
Tim J. Robbins
4bf546e192 Replace this wcsncpy() implementation with one based on strncpy.c to fix
two major bugs:
- off-by-one overflow when the length of the source string exceeds or
  equals the destination buffer size.
- old version was not padding the destination buffer with null wide chars
2002-10-23 04:35:25 +00:00
Robert Watson
84333872d8 If LOGIN_SETMAC is set and MAC is enabled in the kernel, then see
if the user has a 'label' entry in their login class.  If so, attempt
to set that label on the process as part of the credential setup.  If
we're unable to parse the label, or unable to set the label, fail.
In the future, we may also want to warn if a label is set but the
kernel doesn't support MAC.

Approved by:	re
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-23 03:17:22 +00:00
Juli Mallett
a43cf6c23b Use an error message closer to old dumpfs(8) in the case of truncated/no
superblock.

Submitted by:	kkenn

Can't use it verbatim, at least I hate to, as the ", skipped" bit doesn't
make much sense in a library, to me.
2002-10-22 19:36:10 +00:00