Commit Graph

3626 Commits

Author SHA1 Message Date
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
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
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
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
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
Alfred Perlstein
9ed01b5d3b Explain to users that they may want to kldload aio.
Move Xref sections.

Submitted by: Craig Rodrigues <rodrigc@attbi.com>
2002-10-22 16:12:27 +00:00
Jake Burkholder
2ecf9f7162 Rename the libc signal trampoline to __sigtramp to match netbsd. This
should allow gdb to detect when we're executing in a signal trampoline.
2002-10-22 15:15:39 +00:00
Robert Watson
391b1d758d Reflect MAC kernel/user API changes into the libc MAC implementation.
This removes a lot of complexity, since we basically just reserve
space on a retrieval of a label, and pass around strings.  Two new
elements: (1) consumers of the API must now declare what label
elements they are interested in retrieving, or (2) rely on the default
provided in a new configuration file, mac.conf.

Approved by:	re
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-22 14:36:11 +00:00
Robert Watson
19eab74a6c .Xr mac.3 and posix1e.3 to mac.9. Point at sys/mac.h in posix1e.3.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-22 01:52:53 +00:00
Robert Watson
803bf0837b Unhook the per-policy parsing/printing MAC modules in libc to prepare
to bring in the new MAC label management API.  With the new API
revision, we have only policy-agnostic code in libc and the base
kernel.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-21 03:54:24 +00:00
Sam Leffler
5100bb69ac track gratuitous change to sys/i386/include/reg.h 2002-10-21 03:47:22 +00:00
Tim J. Robbins
9619813de9 Cross-reference fmtcheck(3). 2002-10-20 03:56:37 +00:00
Peter Wemm
d7dd6ae7ec Give in on the __sF stuff. I have a better fix in mind that is future
proof, but this should buy me some time for now.
2002-10-19 22:28:07 +00:00
Tim J. Robbins
118bb75e02 Indent code example with one tab, not two, for consistency with the rest. 2002-10-19 13:48:45 +00:00
Tim J. Robbins
f7383f14ae C89 does not specifiy strsep(), so our strsep() implementation cannot
conform to it.

Obtained from:	OpenBSD
2002-10-19 13:41:22 +00:00
Tim J. Robbins
67c3339291 The ftok() function has not been in libcompat for quite a while. 2002-10-19 13:33:12 +00:00
Mark Murray
08076c086f Oops. Also provide a lint-compatible unused argument warning killer. 2002-10-18 16:24:20 +00:00
Mark Murray
6b83b5cdb8 ISOfy functions, sort headers and mark unused arguments. 2002-10-18 16:22:13 +00:00
Mark Murray
9e542d7dbc Correct the headers needed to use dbopen(3) and friends. 2002-10-18 16:20:08 +00:00
Tim J. Robbins
0145ba86d1 Fix off-by-one error when pushing back a multibyte sequence in
wide character class (%l[) and wide string (%ls) conversions.
2002-10-17 13:04:00 +00:00
Tim J. Robbins
63b01047f4 Make part of the previous change clearer; check flags for SUPPRESS directly
instead of checking whether we're using a temporary buffer.
2002-10-17 12:06:29 +00:00
Tim J. Robbins
bd25c6f476 The field width for single-byte string conversions (%c, %s, %[) is the
maximum number of bytes that may be stored in the array, not the maximum
number of wide characters to read. The wording of the standard unfortunately
does not make this clear.
2002-10-17 12:02:36 +00:00
Alfred Perlstein
e6fc380cd2 de-__P() 2002-10-16 22:18:42 +00:00
Robert Drehmel
6c84d0b1a5 - Remove the lsearch() and lfind() functions and their manpage from
the compatibility library libcompat.
 - Add new implementations of lsearch() and lfind() which conform to
   IEEE Std 1003.1-2001 to libc.  Add a new manual page for them and
   add them to the makefile.
 - Add function prototypes for lsearch() and lfind() to the search.h
   header.
2002-10-16 14:29:23 +00:00
Tim J. Robbins
35739e072b Count field width correctly for suppressed multibyte fields (%*lc,
%*ls, %*l[).
2002-10-16 14:07:08 +00:00
Robert Drehmel
e2830bc9e0 Remove unneeded $FreeBSD$ tags. 2002-10-16 14:05:29 +00:00
Robert Drehmel
e768c1be41 - Remove the old insque() and remque() functions and their manual
page from the compatibility library.
 - Add new implementations of insque() and remque() which conform to
   IEEE Std 1003.1-2001 to libc.  Add a new manual page for them and
   connect them to the build.
 - Add the prototypes of insque() and remque() to the search.h
   header.
2002-10-16 14:00:46 +00:00
Tim J. Robbins
6180233fd8 Set the error bit on the stream if an encoding error occurs. Improve
handling of multibyte sequences representing null wide characters.
2002-10-16 12:09:43 +00:00
Tim J. Robbins
9acd2d9b3c Avoid truncating invalid wide characters that are outside the range of
'unsigned char'; signal an error instead.
2002-10-16 11:37:38 +00:00
Tim J. Robbins
185b9d1c2c Add a Bugs section and note that fmtcheck() is out of sync with printf();
it does not recognise any of the conversions or modifiers added in C99.
2002-10-16 04:03:02 +00:00
Tim J. Robbins
927ecbf313 Add support for the XSI %C and %S formats, which are the same as %lc
and %ls.
2002-10-16 03:55:53 +00:00
Ian Dowse
d7cd6ba39b Use kqueue(2) instead of poll(2) to wait for replies and timeouts
in the UDP RPC client code. As a side-effect, this fixes some bugs
that might prevent the RPC call from ever timing out for example
if the server keeps responding with the wrong xid. This could
probably be simplified further by using the EVFILT_TIMER filter.
2002-10-15 22:28:59 +00:00
Tim J. Robbins
2fe3e5cda7 Add cross-references to the wide character counterparts of these functions. 2002-10-15 10:11:53 +00:00
Maxim Sobolev
f927dfabc9 Eliminate superfluous memory access in memcpy(3)/memmove(3).
Obtained from:	NetBSD
MFC after:	1 week
2002-10-15 09:50:07 +00:00