Commit Graph

6546 Commits

Author SHA1 Message Date
Andrey A. Chernov
1e2cd54448 According to SUSv2, always return 0 for null wide-character code 2002-08-19 18:06:18 +00:00
Juli Mallett
a10a751f68 s/trailing NULL/trailing NUL/ 2002-08-19 17:14:58 +00:00
Andrey A. Chernov
9424df445a Move internal defines from ctype.h here 2002-08-19 09:02:49 +00:00
Juli Mallett
6879bea818 Leave room for a trailing NUL not a NULL, that's not an ASCII character. 2002-08-19 03:52:36 +00:00
Tim J. Robbins
e92a3d83fc Implement the ISO C90 Amd.1 restartable wide and multibyte character
manipulation functions mbrlen(), mbrtowc(), mbsinit(), mbsrtowcs(),
wcrtomb(), wcsrtombs().
2002-08-18 06:30:10 +00:00
Andrey A. Chernov
d8d0cebecd Move wcwidth() to separate file, it doesn't belong to iswctype.c at all 2002-08-17 20:30:34 +00:00
Andrey A. Chernov
1c15ec1eab According to SUSv2, wcwidth() should return -1 for non-printing characters 2002-08-17 20:11:31 +00:00
Andrey A. Chernov
88c669d2ea Cosmetic - remove unneded brackets and #undef 2002-08-17 20:03:44 +00:00
Andrey A. Chernov
c87e6b26b0 wcwidth: fix espression to work correctly with SWIDTH0 2002-08-17 14:16:14 +00:00
Bosko Milekic
b8606fe660 Fix libc build breakage by defining FSTYPENAMES before including
disklabel.h; broken originally by 1.87 of sys/disklabel.h, which
made the split between DKTYPENAMES and FSTYPENAMES.
Someone who knows disklabel.c: do we still need DKTYPENAMES to be
defined here now?
2002-08-16 15:33:20 +00:00
Michael C . Wu
dff784192b Add iswctype wcwidth function code
Submitted by:	clkao@clkao.org
Reviewed by:	keichii
Obtained from:	NetBSD
MFC after:	1 month
2002-08-16 13:45:23 +00:00
Alfred Perlstein
aa22cbfea7 Hide 'struct ucred' behind '#ifdef _KERNEL', this should stop userland
from attempting to use it for good.  There is a catch, kvm_proc.c needs
to '#define _KERNEL' to get at the ucred.

Requested by: rwatson
2002-08-16 07:01:43 +00:00
Robert Watson
27a68d26ae Add LOGIN_SETMAC, which will indicate to the user context management code
that it should also set the user's default MAC label, if available and
permitted.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-08-16 02:14:21 +00:00
Robert Drehmel
085f131a15 - Fix a bug that wrote one char behind the end of the
supplied buffer in case the size of it was equal to
   the number of characters the converted address consumed.
   The bug occurred when converting an AF_INET address.
 - Remove the SPRINTF macro and use sprintf instead.
 - Do not do string formatting using sprintf(3) and a
   temporary buffer which is copied when the supplied
   buffer provides enough space.  Instead, use snprintf(3)
   and the real destination buffer, thus avoid the copy.

Reported by:	Stefan Farfeleder <e0026813@stud3.tuwien.ac.at> (1)
PR:		misc/41289
2002-08-15 21:19:31 +00:00
Robert Drehmel
7cfcd02787 Put each function argument on its own line to keep lines shorter
than 80 columns.
2002-08-15 20:33:44 +00:00
Robert Drehmel
2caa6a5afe Use one line for each function argument to keep the line
width smaller than 80 columns.

Thanks to Ruslan for an explanation of multiple ways to
achieve this.
2002-08-15 18:57:57 +00:00
Bruce Evans
ea1df4b7bb Removed duplicated MLINKS which make(1) recently started warning about. 2002-08-15 12:31:01 +00:00
Robert Drehmel
b78411b153 Include <stdlib.h> to have abort() and exit() declared. 2002-08-15 11:58:24 +00:00
Robert Drehmel
f8418db73e - For compliance with IEEE Std 1003.1-2001, add the 'restrict'
qualifier to function prototypes and definitions where
   appropriate using the '__restrict' macro.
 - Update the manual page.
2002-08-15 10:28:52 +00:00
Robert Drehmel
71a00a449f - Introduce the 'restrict' qualifier to function prototypes and
definitions to comply with IEEE Std 1003.1-2001.
 - Update the manual pages.
2002-08-15 09:47:10 +00:00
Robert Drehmel
5618f72405 - Add the 'restrict' qualifier to the function prototypes and
definitions of the functions that convert strings to numbers
   and are defined by IEEE Std 1003-1.2001.
 - Use ANSI-C function definitions for all of the functions
   mentioned above plus strtouq and strtoq.
 - Update the prototypes in the manual pages.
2002-08-15 09:25:04 +00:00
Robert Drehmel
3248d0a517 - Add the 'restrict' qualifier to the function definitions and
public prototypes of setbuf(3) and setvbuf(3) using the
   '__restrict' macro from <sys/cdefs.h> to be compliant with
   IEEE Std 1003.1-2001.
 - Replace the K&R with ANSI-C function definitions.
 - Bring the manual page up-to-date.
2002-08-14 23:45:42 +00:00
Robert Drehmel
620035ef89 - Add the 'restrict' qualifier to the function definition of
strftime(3) for IEEE Std 1003.1-2001 compliance and remove
   excessive usage of the 'const' qualifier that was neither
   present in the prototype in the publice header, nor in the
   local prototype just above the function definition.
 - Replace the K&R function definition with a ANSI-C one.
 - Update the prototype of strftime(3) in its manual page.
2002-08-14 23:20:48 +00:00
Robert Drehmel
ad90696815 - Add the 'restrict' qualifier to the definitions of the string
concatenation and copy functions using the '__restrict' macro.
   This is to satisfy IEEE Std 1003-1.2001.
 - Use ANSI-C function definitions.
 - Add the 'restrict' keyword to the manual pages, too.
2002-08-14 22:59:22 +00:00
Robert Drehmel
d542f511a0 - Add the C99 'restrict' qualifier using the '__restrict' macro to
function prototype and definition of strptime(3).
 - Update the manual page.
2002-08-14 22:36:22 +00:00
Robert Watson
912dd12ad1 Use "ugidfw.h" rather than <ugidfw.h> so that mkdep can find it.
Suggested by:	mike
2002-08-14 22:30:07 +00:00
Robert Drehmel
840b798c83 - Add the 'restrict' qualifier to match the IEEE Std 1003.1-2001
prototype of the tdelete(3) function.
 - Remove duplicated space.
 - Use an ANSI-C function definition for tdelete(3).
 - Update the manual page.
2002-08-14 21:16:41 +00:00
Robert Drehmel
33f9b60eee - Add the 'restrict' qualifier required by IEEE Std 1003.1-2001
to the function definition of strxfrm(3) in form of our
   '__restrict' macro.
 - Use an ANSI-C function definition for strxfrm(3).
 - Change the manual page accordingly.
2002-08-14 21:01:04 +00:00
Robert Drehmel
b7dbaf7b46 -Add the restrict required by IEEE Std 1003.1-2001 in form
of our __restrict macro to the prototypes and function
   definitions of inet_pton and inet_ntop.
 - Use ANSI-C function argument lists.
 - Adjust the prototypes in the manual page.
2002-08-14 20:40:35 +00:00
Poul-Henning Kamp
209c34ba95 Unbreak one of the most confusing breaks of the tree I've seen.
The last commit cannot possibly have been tested.
2002-08-13 18:55:51 +00:00
Andrey A. Chernov
a2a26d0a3d Reduce BSS size for programs which not load collate by eliminating
static buffer.
2002-08-13 14:55:17 +00:00
David Malone
ea33013bc4 Use a union to access the words of a double as this is less likely
to cause bugs when gcc is more aggressively optimising things.

There are still problems with dtoa mentioned in the PR - maybe
Dan could suggest a patch.

PR:		40209
Submitted by:	Dan Lukes <dan@obluda.cz>
Approved by:	bde
MFC after:	2 weeks
2002-08-13 14:17:39 +00:00
Ruslan Ermilov
e091d0c2ac can not -> cannot. 2002-08-13 14:10:36 +00:00
Tim J. Robbins
439cb19e04 Tidy up SRCS and MAN assignments. 2002-08-13 11:56:02 +00:00
Tim J. Robbins
73ab4b2b33 Remove the Bugs section, which is not relevant to FreeBSD: there is no
one-character ungetwc(3) buffer limit.
2002-08-13 10:50:22 +00:00
Tim J. Robbins
46624699bd FreeBSD-ify: use In macro for header files in Synopsis, St C-99 instead of
St C99 in Standards section.
2002-08-13 10:47:17 +00:00
Tim J. Robbins
e74101e4ef Basic support for wide character I/O: getwc(), fgetwc(), getwchar(),
putwc(), fputwc(), putwchar(), ungetwc(), fwide().
2002-08-13 09:30:41 +00:00
Ruslan Ermilov
f350abf814 Handle the escaped colon \: in a capability.
PR:		bin/30778
Reviewed by:	ache, peter
MFC after:	3 days
2002-08-12 19:13:22 +00:00
Andrey A. Chernov
e34fe8a408 Now malloc() is fixed, remove errno hardcoding to ENOMEM 2002-08-12 17:14:04 +00:00
Tim J. Robbins
01533af5a0 Manual pages for fwide(), getwc(), fgetwc(), getwchar(), putwc(), fputwc(),
putwchar(), ungetwc() from NetBSD and Citrus Project, unmodified except
for the addition of $FreeBSD$.

Obtained from:	NetBSD, Citrus Project
2002-08-12 13:23:12 +00:00
Andrey A. Chernov
7e3c1a3cb7 Now, malloc is fixed, remove ENOMEM hardcode 2002-08-12 11:47:19 +00:00
David Malone
3ab539dcb4 Add a missing copyright for Doug. There are other files missing this
copyright in -stable.

PR:		41397
Submitted by:	dfr
2002-08-11 19:31:02 +00:00
Juli Mallett
e079a00a77 Initialise disk->d_ufs so that in sblock.c it's always initialised
(unless someone tries to use libufs support functions without using
	_fillout or _ctor to construct a uufsd.)

Obtained from:	jmallett_libufs Perforce branch.
2002-08-11 15:37:10 +00:00
Jens Schweikhardt
2b239dd118 Fix typos; each file has at least one s/seperat/separat/
(I skipped those in contrib/, gnu/ and crypto/)
While I was at it, fixed a lot more found by ispell that I
could identify with certainty to be errors. All of these
were in comments or text, not in actual code.

Suggested by:	bde
MFC after:	3 days
2002-08-11 13:05:30 +00:00
Robert Watson
909410cf5b Whitespace cleanup--it's not style(9), but it is consistent. Prep
for MAC-related commits to the login infrastructure.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-08-11 01:48:43 +00:00
Jake Burkholder
5aebb40291 Auto size available kernel virtual address space based on phsyical memory
size.  This avoids blowing out kva in kmeminit() on large memory machines
(4 gigs or more).

Reviewed by:	tmm
2002-08-10 22:14:16 +00:00
Maxime Henrion
5965373e69 - Introduce a new struct xvfsconf, the userland version of struct vfsconf.
- Make getvfsbyname() take a struct xvfsconf *.
- Convert several consumers of getvfsbyname() to use struct xvfsconf.
- Correct the getvfsbyname.3 manpage.
- Create a new vfs.conflist sysctl to dump all the struct xvfsconf in the
  kernel, and rewrite getvfsbyname() to use this instead of the weird
  existing API.
- Convert some {set,get,end}vfsent() consumers to use the new vfs.conflist
  sysctl.
- Convert a vfsload() call in nfsiod.c to kldload() and remove the useless
  vfsisloadable() and endvfsent() calls.
- Add a warning printf() in vfs_sysctl() to tell people they are using
  an old userland.

After these changes, it's possible to modify struct vfsconf without
breaking the binary compatibility.  Please note that these changes don't
break this compatibility either.

When bp will have updated mount_smbfs(8) with the patch I sent him, there
will be no more consumers of the {set,get,end}vfsent(), vfsisloadable()
and vfsload() API, and I will promptly delete it.
2002-08-10 20:19:04 +00:00
Poul-Henning Kamp
9b14c27a86 Update with new error return code.
Reminded by:	rwatson
2002-08-09 13:22:21 +00:00
Ruslan Ermilov
cc6638bd55 mdoc(7) police: spelling. 2002-08-09 12:08:47 +00:00
Ruslan Ermilov
81b380a87b mdoc(7) police: tidy up the formatting. 2002-08-09 12:07:17 +00:00
Ruslan Ermilov
55dd392cb4 mdoc(7) police: punctuation. 2002-08-09 11:36:48 +00:00
Ruslan Ermilov
0df8febf2c mdoc(7) police: sort xrefs. 2002-08-09 11:33:23 +00:00
Ruslan Ermilov
a8272f7106 mdoc(7) police: punctuation. 2002-08-09 11:24:21 +00:00
Ruslan Ermilov
bebfe08f18 mdoc(7) police: whitespace nits. 2002-08-09 11:17:56 +00:00
Ruslan Ermilov
e0fe2c62de mdoc(7) police: laundry. 2002-08-09 11:15:49 +00:00
Ruslan Ermilov
760d968629 mdoc(7) police: laundry. 2002-08-09 11:06:03 +00:00
Poul-Henning Kamp
f42f7c54c8 Make sure we set errno sensibly in case of failure.
Spotted by:	ache
2002-08-09 10:16:24 +00:00
Poul-Henning Kamp
9d6d1ee63e Introduce a new error return code:
#define EDOFUS          88              /* Programming error */
This can be used to signal error situations which indicate that the
program logic or assumptions is deficient.
2002-08-09 10:15:48 +00:00
Andrey A. Chernov
ec5ca2eba7 Add safeguards to never use errno == 0 as setrunelocale() error return code 2002-08-09 08:22:29 +00:00
Robert Watson
ecfbf7e46d Update TE policy and MAC text conversion routines to support partial
label updates.  Biba and MLS already supported this.  This permits the
userland library to submit relative updates on MAC labels, rather
than submitting an entire label to replace the current label.  This
also requires changes to the MAC modules, which are forthcoming.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-08-09 03:09:38 +00:00
Robert Watson
1355f6d016 X-ref mac.3. 2002-08-09 03:03:08 +00:00
Alexander Kabaev
dc0f86a25d Use '_end' symbol instead of 'end' to initialize minbrk and curbrk
variables. Both symbols are set to the same value by the linker,
and _end symbol has less chances to clash with application defined
global symbols.

alpha, ia64 and sparc64 ports already use _end, i386 is now
consistent with them.

Reviewed by:	bde
Approved by:	obrien
Reported by:	pirzyk
2002-08-08 17:28:07 +00:00
Andrey A. Chernov
76692b8025 Rewrite locale loading procedures, so any load failure will not affect
currently cached data.  It allows a number of nice things, like: removing
fallback code from single locale loading, remove memory leak when LC_CTYPE
data loaded again and again, efficient cache use, not only for
setlocale(locale1); setlocale(locale1), but for setlocale(locale1);
setlocale("C"); setlocale(locale1) too (i.e.  data file loaded only once).
2002-08-08 05:51:54 +00:00
Mike Barcroft
af8c0bce98 Implement POSIX.1-2001 (XSI)'s ulimit(3).
Submitted by:	Kyle Martin <mkm@ieee.org>
2002-08-08 04:50:36 +00:00
Andrey A. Chernov
315009a483 Set errno to ENOMEM for strdup too (due to malloc errno bug) 2002-08-07 23:52:28 +00:00
Andrey A. Chernov
cb9772d882 Always set errno to ENOMEM after malloc failed (as workaround).
Our malloc sometimes forget to set errno, f.e. for size overflow case.
2002-08-07 22:03:46 +00:00
Andrey A. Chernov
57473ad215 Reset __mb_cur_max to 1 when "C" or "POSIX" locales loaded after multibyte one 2002-08-07 20:49:25 +00:00
Andrey A. Chernov
45206d5c69 Fix wrong address when EucInfo > "variable" size 2002-08-07 20:20:56 +00:00
Archie Cobbs
a8ee7a0256 Correct an inaccuracy in this man page regarding detecting empty fields.
MFC after:	2 days
2002-08-07 20:08:50 +00:00
Garrett Wollman
4879739808 Document file descriptor reopening and current standardization status. 2002-08-07 18:03:30 +00:00
Andrey A. Chernov
6892b144e8 Style fixes in preparation for rewritting 2002-08-07 18:02:45 +00:00
Andrey A. Chernov
1491b31e18 Style fixes 2002-08-07 16:49:20 +00:00
Andrey A. Chernov
ecc4c62066 Style fixes in preparation of code rewritting 2002-08-07 16:45:23 +00:00
Andrey A. Chernov
dfb18183be Close descriptor, if error happens in loadCat() 2002-08-07 07:02:37 +00:00
Tim J. Robbins
71a63bac1b Build iswctype.c and manual pages for the functions it defines. 2002-08-06 00:49:59 +00:00
Mike Barcroft
0f1bfcd283 o Fix a memory leak.
o Rewrite validmsgverb() so that it works (I'm not sure how it escaped
  my original testing).
o Document nextcomp().
2002-08-05 19:36:09 +00:00
Tim J. Robbins
677adc79c2 Add missing prototypes for extension functions to the SYNOPSIS. 2002-08-05 11:02:04 +00:00
Tim J. Robbins
21b7821a9e Use In macro instead of Fd. Add crossref to wctype(3). Refer to 1003.1-2001
in STANDARDS section. Document functions which are extensions to the standard.
2002-08-05 10:50:39 +00:00
Tim J. Robbins
15c57797bb Use the In macro instead of Fd. Add crossref to wctrans(3). Refer to
1003.1-2001 in STANDARDS section.
2002-08-05 10:48:05 +00:00
Tim J. Robbins
6b44a04d1c Implement the missing <wctype.h> functions: isw*() (iswalnum() etc.),
towlower() and towupper() required by ISO C90 Amd. 1.

iswascii(), iswhexnumber(), iswideogram(), iswnumber(), iswphonogram(),
iswrune() and iswspecial() have also been implemented for consistency
with the BSD extensions in <ctype.h>.
2002-08-05 10:45:23 +00:00
Andrey A. Chernov
3a317a1229 Reject encoding > ENCODING_LEN at early stage instead of truncating it.
Use ptr == NULL instead of !ptr in few places.
Move saverr declaration to global section.
2002-08-05 09:58:45 +00:00
Tim J. Robbins
008a2c53ce Manual pages for wide character classification (isw*) and case conversion
(tow*) functions from NetBSD, unmodified except for the addition of $FreeBSD$.

Obtained from:	NetBSD
2002-08-05 08:04:58 +00:00
Mike Barcroft
823f68a28a Implement POSIX.1-2001 (XSI)'s fmtmsg(3). 2002-08-05 06:49:58 +00:00
Andrey A. Chernov
97c54f7797 Try harder to check lang as path component (".", "..", / inside).
Try harder to not overwrite failure errno.
style(9) whitespace reformatting for code readability.
2002-08-04 14:03:59 +00:00
Tim J. Robbins
4bd5585fbd Change wctype_t to an unsigned type to avoid warnings. 2002-08-04 12:43:53 +00:00
Tim J. Robbins
4645079944 Add the ISO C90 Amd. 1 wctrans(3) and towctrans(3) functions. 2002-08-04 12:09:08 +00:00
Tim J. Robbins
92ece88d16 Add btowc(3) to SEE ALSO section. 2002-08-04 11:02:21 +00:00
Andrey A. Chernov
f75bb0aa25 Use errno to indicate failure reason.
Remove incomplete checks for 'name' and 'PatchLocale', they must be
already checked at this point.
2002-08-04 09:37:28 +00:00
Bruce Evans
1a2140f531 Fixed some style bugs (unsorting of MLINKS, and more than 1 assignment to
MAN per section).
2002-08-04 07:54:41 +00:00
David E. O'Brien
29a487cb1f Updated libc/libc_r that fixes the FreeBSD-SA-02:28.resolv resolver bug.
Submitted by:	Trevor Johnson <trevor@jpj.net>
2002-08-04 05:51:05 +00:00
Andrey A. Chernov
10bc1114ce Rewrite loadlocale() to eliminate LOAD_CATEGORY macro to save space. 2002-08-04 04:29:54 +00:00
Andrey A. Chernov
27ebcacbb0 Nonexistent SIZE_MAX -> SIZE_T_MAX 2002-08-04 04:11:48 +00:00
Tim J. Robbins
d4ba1c2249 Signal an error instead of giving the caller less memory than they asked
for when num * size would cause integer overflow.

MFC after:	1 week
2002-08-04 02:52:11 +00:00
Andrey A. Chernov
9bb322433e Add ERRORS section according to POSIX (no errors) 2002-08-03 17:20:45 +00:00
Andrey A. Chernov
2f6754febb Catch empty encoding name too 2002-08-03 17:09:21 +00:00
Andrey A. Chernov
40b97dcb2a Fix return codes to match what setrunelocale() returns 2002-08-03 16:26:47 +00:00
Andrey A. Chernov
5740f28044 Preserve errno in fallback code 2002-08-03 15:56:25 +00:00
Tim J. Robbins
e9fb70115f Add ISO C90 Amd. 1 btowc(3) and wctob(3) functions. 2002-08-03 13:49:55 +00:00
Tim J. Robbins
196099d661 Correct use of Nm macro in NAME section and a broken cross reference. 2002-08-03 12:39:41 +00:00
Andrey A. Chernov
710d708144 Return errno provided by fopen, not always ENOENT.
Return EFTYPE instead of EINVAL for wrong locale file format.
Whitespaces.
2002-08-03 11:55:19 +00:00
Andrey A. Chernov
256ddd5999 Check encoding for ".", ".." and / inside 2002-08-03 10:23:06 +00:00
Andrey A. Chernov
5568219d15 Return EINVAL for NULL or too long encoding, not EFAULT 2002-08-03 09:10:31 +00:00
Andrey A. Chernov
83c9580dbb Return ENAMETOOLONG for long PATH_LOCALE, not EFAULT 2002-08-03 09:07:27 +00:00
Andrey A. Chernov
a17eafe2a8 1) Use errno to indicate faulure reason.
2) Move incomplete check for / in locale name from env section to
loadlocale(), add check for "." and ".." too.
It allows to check any argument, not env only.
3) Redesing LOAD_CATEGORY macro to eliminate code duplication.
4) Try harder in fallback code: if old locale can't be restored,
load "C" locale
5) White space formatting, long lines, etc.
2002-08-03 09:04:44 +00:00
Tim J. Robbins
5b32667c57 Add ISO C90 Amd. 1 wctype(3) and iswctype(3) functions. 2002-08-03 04:18:40 +00:00
Robert Watson
d97fcfce27 Introduce support for Mandatory Access Control and extensible
kernel access control.

Extensions to libc to provide basic MAC label manipulation facilities
for userland.  These interface will be replaced in the next month
or two with more flexible interfaces, but provide sufficient support
to allow use of the Biba and MLS policies for user applications.

libc_r wrappers to follow.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-08-02 21:14:42 +00:00
Andrey A. Chernov
4e7b46d8e2 Sligtly modify previous out-of-bounds fix: just break instead of
return(NULL) for upward compatibility with more LC_* categories may be
implemented in future.
2002-08-02 13:36:54 +00:00
Robert Watson
5fc5c0cd3b De-gccize CFLAGS by removing it.
NOMAN is no longer required when a man page is not yet present.

Submitted by:	ru
2002-08-02 13:33:17 +00:00
Maxime Henrion
9e69d6b629 Remove an #include <syslog.h>. It's already included conditionally
above, as it should be.

Submitted by:	Olivier Houchard <cognet@ci0.org>
2002-08-02 11:58:48 +00:00
Robert Watson
ed5740842e Hook up libugidfw to the build.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-08-02 07:09:53 +00:00
Robert Watson
46d1a925c2 Introduce support for Mandatory Access Control and extensible
kernel access control.

Provide a library to manage user file system firewall-like rules
supported by the mac_bsdextended.ko security model.  The kernel
module exports the current rule set using sysctl, and this
library provides a front end that includes support for retrieving
and setting rules, as well as printing and parsing them.

Note: as with other userland components, this is a WIP.  However,
when used in combination with the soon-to-be-committed ugidfw,
it can actually be quite useful in multi-user environments to
allow the administrator to limit inter-user file operations without
resorting to heavier weight labeled security policies.

Obtained form:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-08-02 07:07:35 +00:00
Andrey A. Chernov
ef1e7a2656 Prevent out of bounds writting for too many slashes case.
Replace strnpy + ='\0' with strlcpy

MFC after:	1 day
2002-08-02 01:04:49 +00:00
Jacques Vidrine
8f3e3652e4 The fix applied to the XDR decoder in revision 1.11 was incorrect. 2002-08-01 12:23:04 +00:00
Mark Murray
c13373b7d7 Fix an easy warning in a local addition. 2002-08-01 11:29:05 +00:00
Jake Burkholder
f739b33f57 Stash various networking paramters in the environment for the kernel
to pick up, ala pxe.
2002-07-31 20:17:06 +00:00
Jacques Vidrine
b113cd8006 Sort headers to reduce diffs between branches. 2002-07-31 15:11:59 +00:00
Darren Reed
cc0178a73e some dolt forgot to add in an include for <limits.h> 2002-07-31 14:47:02 +00:00
Darren Reed
7fc37b7c09 Patch to fix bounds checking/overflow.
Obtained from:	OpenBSD
2002-07-31 12:50:28 +00:00
Chris Costello
0b50f33046 Grammar (was' -> were') 2002-07-31 06:40:34 +00:00
Dag-Erling Smørgrav
68e6e4bd40 Since pam_get_authtok(3) doesn't know about our options structure, setting
the PAM_ECHO_PASS option on-the-fly is a NOP (though it wasn't with the
old pam_get_pass(3) code).  Instead, call pam_prompt(3) directly.  This
actually simplifies the code a bit.

MFC after:	3 days
2002-07-30 08:32:03 +00:00
Mike Silbersack
e3682e195b Update docs to reflect change in count of procs reserved for root
from 1 to 10.

PR:		kern/40515
Submitted by:	David Schultz <dschultz@uclink.Berkeley.EDU>
MFC after:	1 day
2002-07-30 05:36:34 +00:00
Ruslan Ermilov
d2893b161b Drop support for COPY, -c has been the default mode of install(1)
for a long time now.

Approved by:	bde
2002-07-29 09:40:17 +00:00
Ian Dowse
bb1ca86f24 Revert part of revision 1.10, as it broke portmap lookups for IPv4
TCP clients. The problem was that a struct netconfig returned by
getnetconfigent() was being treated as a handle for __rpc_getconf(),
which certainly isn't right.

The tirpc-99 code uses __rpc_setconf("udp")/__rpc_getconf() to find
the IPv4 udp netconfig, but our implementation of these functions
seem happy to return IPv6 entries, so we can't use them. By reverting
to the old version, we are hard-coding the name of the udp4 netid.

Tracked down by:	Bakul Shah <bakul@bitblocks.com>
2002-07-26 07:52:21 +00:00
Hajimu UMEMOTO
2cbe834ad1 sysctl(NET_RT_IFLIST) up to several (currently 5) times.
This will make the behavior robuster if many addresses are added
after the size estimation of storage at the first sysctl.

Reviewed by:	JINMEI Tatuya <jinmei@isl.rdc.toshiba.co.jp>
MFC after:	1 week
2002-07-25 08:08:30 +00:00
Hajimu UMEMOTO
f6074d745f - ntohs() returns unsigned value.
- use strlcpy.
- snprintf can return negative value, so cope with it.
- tweak interface index on interface locals (ff01::/16).
- removed unused macros.
- removed a macro that uses only once (in a trivial context).
- explicitly say goodbye to ENI_xxx.
- constify struct afd.

Obtained from:	KAME
MFC after:	1 week
2002-07-24 18:58:32 +00:00
Dag-Erling Smørgrav
99260419d6 Install more man pages - I thought I'd committed this ages ago... 2002-07-23 17:59:46 +00:00
Ruslan Ermilov
61a875d706 Don't forget to recalculate the IP checksum of the original
IP datagram embedded into ICMP error message.

Spotted by:	tcpdump 3.7.1 (-vvv)
MFC after:	3 days
2002-07-23 00:16:19 +00:00
Dag-Erling Smørgrav
190c185e22 Surround prototypes with __BEGIN_DECLS / __END_DECLS.
PR:		misc/40399
MFC after:	3 days
2002-07-22 16:11:39 +00:00
Peter Wemm
7657553c76 Add an ia64 atomic lock primitive for libc_r. This is mostly for
completeness and doesn't get us a working libc_r there because libc_r
uses setjmp() and setjmp() cannot be used for context switches on ia64
as-is (or sparc64).  Rather than making setjmp/longjmp behave like
the *context() calls, it would be far better to make libc_r use *context()
directly which is what they are for.

Obtained from:  marcel
2002-07-20 19:22:10 +00:00
Peter Wemm
21a7fd75c3 Reimplement malloc/free debugging that includes the offending file:line
info.  This turned out to be rather useful on ia64 for tracking down
malloc/free problems.
Detect duplicate free()'s - otherwise these show up as a guard1 failure
and it looks like corruption instead of something simple like a second
free() where there shouldn't be.
Deal with libz using libc headers and not seeing the malloc/free stuff that
we provide in libstand.  Do similar nastiness to what is done for bzlib.

Tested on: i386, ia64 (compile, run)
2002-07-20 04:18:20 +00:00
Peter Wemm
a4e7b0c88f Add __printflike() to printf() and sprintf() prototypes. -ffreestanding
turns off gcc's builtin attributes for these functions and as a result
-Wformat does no checking. (argh)
2002-07-20 03:55:06 +00:00
Ruslan Ermilov
0b87f79976 s/${INSTALL} -c/${INSTALL} ${COPY}/ 2002-07-18 12:07:49 +00:00
Luigi Rizzo
90780c4b05 Move IPFW2 definition before including ip_fw.h
Make indentation of new parts consistent with the style used for this file.
2002-07-18 05:18:41 +00:00
Mike Heffner
4a59c3ab55 Update glob(3) to add all the POSIX required options, specifically:
- add GLOB_NOMATCH return value and use it when we don't get a match
- rename GLOB_ABEND to GLOB_ABORTED and use it instead of returning 1
  in some places
- add GLOB_NOESCAPE flag and retire GLOB_QUOTE to compatibility
  section

Suggestions/advice on correct usage of POSIX defines: wollman
2002-07-17 04:58:09 +00:00
Kirk McKusick
fb36a3d847 Change utimes to set the file creation time (for filesystems that
support creation times such as UFS2) to the value of the
modification time if the value of the modification time is older
than the current creation time. See utimes(2) for further details.

Sponsored by:	DARPA & NAI Labs.
2002-07-17 02:03:19 +00:00
Garrett Wollman
020d4fa6de Don't ask me how I consistently turned struct statvfs into struct vfsconf.... 2002-07-16 20:40:12 +00:00
Mark Murray
828191256b The main reason for this is to reduce diffs between all the crt1.c's.
Assembler macros are tidied up and made as similar as sanely possible.
The macros are translated into C (__inline static) functions for lint.

Declaration orders are made the same.
Declarations are all ISOfied and tidied up.

Comment contents have gratuitous diffs removed.

The net result is a bunch of crt1.c's that are 90% the same.
It may be possible to now encapsulate the differences in one
MD header, and have only one MI crt1.c file (although the macros
to do this may be ugly).

Helpful comments by:	obrien, bde
Alpha tested by:	des
i386-elf tested by:	markm
2002-07-16 12:28:50 +00:00
Garrett Wollman
252724764d Assume that my bug report against 1003.1-2001 will be resolved my way,
and make 64-bit architectures use the LP64_OFF64 environment instead
of the LPBIG_OFFBIG one.
2002-07-15 22:43:03 +00:00
Garrett Wollman
603a6e79d8 Support POSIX/SUS ``programming environment'' mistake in confstr(). 2002-07-15 22:21:33 +00:00
Garrett Wollman
97ec79a175 All of the things that confstr() returns are compile-time constants.
It's silly to call sysctl() to get the value of _PATH_STDPATH from
<paths.h> when we can just use it directly.  This greatly simplifies
the implementation.  (This is also part of my grand scheme to get
rid of sysctl's `user' category, which should never have been created.)

Use strlcpy() instead of strncpy() as it has the exact semantics we want.
2002-07-15 21:51:19 +00:00
Giorgos Keramidas
1f2cec106f The .Fn function. 2002-07-15 20:59:12 +00:00
Giorgos Keramidas
ab7e1a5712 The .Fn function 2002-07-15 20:50:16 +00:00
Garrett Wollman
45d2fcfaae Don't bother asking the kernel about _SC_FSYNC; it's not optional. 2002-07-15 20:42:05 +00:00
Giorgos Keramidas
68a8e8a9f3 Add a missing 'function' word.
Use .Vt to mark up `struct stat' when it is a variable type.
2002-07-15 20:07:09 +00:00
Hajimu UMEMOTO
8071d8d70d Use BSDi derived if_nametoindex(), if_indextoname(), if_nameindex()
and if_freenameindex().

Obtained from:	KAME
MFC after:	2 weeks
2002-07-15 19:58:56 +00:00
Giorgos Keramidas
e812f24f6d The .Fn function 2002-07-15 19:56:24 +00:00
Garrett Wollman
c98a4bf3fb Don't claim to fully implement C99 in the STANDARDS section and then disclaim
compliance in the BUGS section immediately below.
2002-07-15 19:46:06 +00:00
Garrett Wollman
647e4efd97 Note that fseeko() and ftello() are standard in 1003.1-2001.
(Prefer the more-encompassing POSIX standard to SUSv2.)
2002-07-15 19:42:25 +00:00
Giorgos Keramidas
ce9fa5fcb2 Fix whitespace in .Bd -literal display of S_IXXX constants.
Noticed by:     jmallett
2002-07-15 08:58:16 +00:00
Alfred Perlstein
988553e96a Fix "rpcinfo -m" when talking to other implementations of rpcbind.
Submitted by: mbr (NetBSD PR#15802)
2002-07-14 23:38:37 +00:00
Alfred Perlstein
886ee6f6a5 clnt_vc_create() has const scalar arguments that wind up being modified,
fix it (make them non-const) and update the associated documentation.

Submitted by: mbr
2002-07-14 23:35:04 +00:00
Alfred Perlstein
c549fd466b Cast function args to silence warning.
Submitted by: mbr
2002-07-14 23:20:08 +00:00
Alfred Perlstein
261e68702a Add a prototype for __rpcb_findaddr_timed to silence a warning. 2002-07-14 23:14:08 +00:00
Alfred Perlstein
cffc0b5784 Silence several warnings due to functions that needed to take a void *
having a char * as an argument instead. clnt_dg_control(), clnt_raw_control(),
clnt_vc_control().
2002-07-14 23:14:02 +00:00
Garrett Wollman
d04f03fc63 Fix a few bugs in the ERRORS section. 2002-07-13 19:38:59 +00:00
Garrett Wollman
6e97e157e8 Add statvfs(3) to the build.
Tested by:	Steve Kargl
2002-07-13 19:33:20 +00:00
Garrett Wollman
b3928a066a Well, it's not quite strxfrm(3) but at least it's honest. 2002-07-13 19:29:44 +00:00
Giorgos Keramidas
079167d6d7 Various typo fixes.
PR:		docs/39395
Submitted by:	Rich Neswold <rneswold@ameritech.net>
2002-07-12 01:30:18 +00:00
Garrett Wollman
4f6799e61e A simple implementation of statvfs(3) (one step above the trivial one).
Not yet connected to the build (awaiting documentation).
2002-07-11 22:54:11 +00:00
Alfred Perlstein
62947a57cc Update manpages to reference 'timed' rpc functions 2002-07-11 22:25:16 +00:00
Juli Mallett
cf6c0643ee Fill out (zero) and fill in (when doing getino()) the minimum and maximum
inodes in our inoblock (disk->d_ino{min,max}) appropriately.
2002-07-11 21:27:26 +00:00
David E. O'Brien
3cc44e2238 RELENG_4_6 PL 1 libc bits with non-vulnerable resolver.
Security Advisory:	FreeBSD-SA-02:28.resolv
2002-07-11 20:40:24 +00:00
Alfred Perlstein
4e37855e01 Add functions allowing for the user to specify a timeout for rpc functions.
Update copyrights to reflect where this code was lifted from. (tirpc '99)

Submitted by: mbr
2002-07-11 16:23:04 +00:00
Thomas Moestl
58d646cdd3 Add missing ret instruction to the ptrace() syscall wrapper. 2002-07-11 15:48:02 +00:00
Garrett Wollman
f646fac5e0 Fix some comments. 2002-07-10 16:35:02 +00:00
Maxim Konovalov
25a6539985 Fix a typo.
MFC after:	3 days
2002-07-10 09:06:42 +00:00
Daniel Eischen
582dfa2dd4 Oops, forgot to set the suspended flag for threads that are created
initially suspended.  This was preventing such threads from getting
resumed.

Reported by:	Bill Huey <billh@gnuppy.monkey.org>
2002-07-09 13:24:52 +00:00
Luigi Rizzo
b3063f064c Fix a bug caused by dereferencing an invalid pointer when
no punch_fw was used.
Fix another couple of bugs which prevented rules from being
installed properly.

On passing, use IPFW2 instead of NEW_IPFW to compile the new code,
and slightly simplify the instruction generation code.
2002-07-08 22:57:35 +00:00
Maxime Henrion
193d036860 Typo fix: Setlogin() -> setlogin().
Submitted by:	Olivier Houchard <cognet@ci0.org>
2002-07-08 20:16:15 +00:00
Mike Barcroft
f71e6a5243 Bring poll.h up to conformance with POSIX.1-2001 by adding some
visibility conditionals, adding the nfds_t type, and changing the
poll() prototype a little.  Update the manual to match.
2002-07-08 16:37:35 +00:00
Jake Burkholder
f9751ec2cd Add a hack (kludge?) to avoid trying to access files backed by disk
devices as though they were backed by network devices.
2002-07-07 23:01:36 +00:00
Daniel Harris
883d00eb92 s/unavilable/unavailable/
PR:		39446
Submitted by:	Stefan Farfeleder <e0026813@stud3.tuwien.ac.at>
MFC after:	1 day
2002-07-07 18:08:51 +00:00
Jake Burkholder
439be3f790 Ficl wants _setjmp and _longjmp. No need for weak symbols either. 2002-07-07 18:04:45 +00:00
Robert Drehmel
897ad22f04 Fix syntax error which occurred when LIBC_SCCS was defined. 2002-07-07 11:28:28 +00:00
Chris Costello
05ddd41b23 Move appropriate information out of DESCRIPTION' and into SECURITY
CONSIDERATIONS'.

Sponsored by:	DARPA, NAI Labs
2002-07-03 15:31:47 +00:00
Mark Murray
ccece3d626 Whitespace diffs only; this brings this file into the same whitespace
convention as src/lib/csu/*/crt1.c.

This will make the follow up diffs easier to see and extract.
2002-07-03 14:42:39 +00:00
Chris Costello
00c3b17e1e Correct a call to fcntl(F_SETFD) to use FD_CLOEXEC' instead of 1'. 2002-07-03 08:15:55 +00:00
Chris Costello
32f9f49908 Add a SECURITY CONSIDERATIONS example: make note that access to open
file descriptors does not change upon dropping privilege, and include
a likely case of `setuid(non_superuser); exec(...);'.

Sponsored by:	DARPA, NAI Labs
Obtained from:	TrustedBSD Project
2002-07-03 08:13:25 +00:00
Jonathan Mini
16f33a4885 Fix off-by-one error.
PR:		misc/40104
Submitted by:	Neal Fachan <neal@isilon.com>
MFC after:	3 days
2002-07-03 06:28:04 +00:00
Ruslan Ermilov
93c163325e No need to explicitly set NOMAN here.
Reviewed by:	jmallett
2002-07-03 06:25:28 +00:00
Mark Peek
3aaa96958d Fix typo (SIGEV_EVENT -> SIGEV_KEVENT). 2002-07-02 21:05:08 +00:00
Hajimu UMEMOTO
b0f06def52 Cope with 2292bis-01 getaddrinfo (no NI_WITHSCOPEID, always attach
scope identifier).

MFC after:	3 weeks
2002-07-02 11:11:17 +00:00
Hajimu UMEMOTO
f8fa093e82 Cope with 2292bis-01 getaddrinfo (no NI_WITHSCOPEID, always attach
scope identifier).

Approved by:	des
MFC after:	3 weeks
2002-07-02 11:09:02 +00:00
Hajimu UMEMOTO
15e4dafc91 Make NI_WITHSCOPEID a default (always on), to synchronize
with recent 2553bis.

Obtained from:	KAME
MFC after:	3 weeks
2002-07-02 11:05:31 +00:00
Daniel Eischen
c3d580c9a1 Fix a couple of minor nits that prevented this from compiling.
Pointed out by:	julian
2002-07-02 01:26:16 +00:00
Juli Mallett
a7a88ab828 DEBUG is a knob that means something else in FreeBSD, use LIBUFS_DEBUG to
turn on tracing.
2002-07-01 18:20:48 +00:00
Juli Mallett
585e540203 In getino, have our DEBUG message in the unhandled case mention that it
does not know what sort of UFS filesystem this is.

Add some DEBUG(NULL)'s to function entry points.
2002-07-01 18:19:20 +00:00
Chris Costello
de19436f24 Rename CAVEAT' to SECURITY CONSIDERATIONS' and move it up to
the correct location--this section consists solely of security
considerations information.

Sponsored by:	DARPA, NAI Labs
Obtained from:	TrustedBSD Project
2002-07-01 14:41:05 +00:00
Brian Somers
27cc91fbf8 Remove trailing whitespace 2002-07-01 11:19:40 +00:00
Juli Mallett
20938dbf84 Add libufs, a library for dealing with UFS filesystems from userland to
the build.  It is here to compartmentalise functionality currently duplicated
in many notable programs in the base system.  It currently handles block
reads and writes, as well as reading and writing of the filesystem superblock,
and the reading/lookup of inode data.  It supports both UFS and UFS2.  I
will be maintaining it, and porting programs to use it, however for now, it
is simply being built as part of world.
2002-07-01 01:45:03 +00:00
Christian Weisgerber
958a88fbf7 LP64 fix: don't cast pointer to int
Reviewed by:	gallatin, ticso
2002-06-30 23:36:21 +00:00
Julian Elischer
58551c0393 Don't even read in the thread if it is a zombie process. 2002-06-30 20:13:53 +00:00
Julian Elischer
bff4151c28 grow a brain and do this right. 2002-06-30 17:06:46 +00:00
Julian Elischer
6143c38376 Don't follow non existant thread pointers (e.g. for zombies) 2002-06-30 08:11:30 +00:00
David E. O'Brien
3b7de54d68 Use FBSDID 2002-06-30 05:36:49 +00:00
Julian Elischer
e602ba25fd Part 1 of KSE-III
The ability to schedule multiple threads per process
(one one cpu) by making ALL system calls optionally asynchronous.
to come: ia64 and power-pc patches, patches for gdb, test program (in tools)

Reviewed by:	Almost everyone who counts
	(at various times, peter, jhb, matt, alfred, mini, bernd,
	and a cast of thousands)

	NOTE: this is still Beta code, and contains lots of debugging stuff.
	expect slight instability in signals..
2002-06-29 17:26:22 +00:00
Peter Wemm
0c079d8c6f To avoid anybody else getting caught out, these two files are really
in /sys/boot/common and are actually used there.
2002-06-29 09:21:14 +00:00
Peter Wemm
08db6efa75 Update from NetBSD 1.3 -> 1.6. Most notable, rev 1.6:
"Make in_cksum work on little endian machines"

This would explain a few things. :-)
2002-06-29 09:00:47 +00:00
David E. O'Brien
2d39517f33 Use __FBSDID. 2002-06-29 03:23:51 +00:00
David E. O'Brien
45d767fbbe Add frexp(3).
Obtained from:	OpenBSD
2002-06-29 03:23:18 +00:00
Andrey A. Chernov
cc1b8dcb1c Add additional field 'overwrite' to login_vars. It mainly needed to handle
"term" according to manpage, i.e. not overwrite it, if already present in
environment.
2002-06-28 14:45:30 +00:00
Daniel Eischen
88127f1a62 Make sigpending and sigsuspend account for signals that are pending on
the process as well as pending on the current thread.

Reported by:	Andrew MacIntyre <andymac@bullseye.apana.org.au>
2002-06-28 13:28:41 +00:00
Daniel Eischen
b4e1c937c7 Add a wrapper for pselect() in order to make it a cancellation point.
Prompted by: wollman
2002-06-28 13:26:02 +00:00
Luigi Rizzo
9758b77ff1 The new ipfw code.
This code makes use of variable-size kernel representation of rules
(exactly the same concept of BPF instructions, as used in the BSDI's
firewall), which makes firewall operation a lot faster, and the
code more readable and easier to extend and debug.

The interface with the rest of the system is unchanged, as witnessed
by this commit. The only extra kernel files that I am touching
are if_fw.h and ip_dummynet.c, which is quite tied to ipfw. In
userland I only had to touch those programs which manipulate the
internal representation of firewall rules).

The code is almost entirely new (and I believe I have written the
vast majority of those sections which were taken from the former
ip_fw.c), so rather than modifying the old ip_fw.c I decided to
create a new file, sys/netinet/ip_fw2.c .  Same for the user
interface, which is in sbin/ipfw/ipfw2.c (it still compiles to
/sbin/ipfw).  The old files are still there, and will be removed
in due time.

I have not renamed the header file because it would have required
touching a one-line change to a number of kernel files.

In terms of user interface, the new "ipfw" is supposed to accepts
the old syntax for ipfw rules (and produce the same output with
"ipfw show". Only a couple of the old options (out of some 30 of
them) has not been implemented, but they will be soon.

On the other hand, the new code has some very powerful extensions.
First, you can put "or" connectives between match fields (and soon
also between options), and write things like

ipfw add allow ip from { 1.2.3.4/27 or 5.6.7.8/30 } 10-23,25,1024-3000 to any

This should make rulesets slightly more compact (and lines longer!),
by condensing 2 or more of the old rules into single ones.

Also, as an example of how easy the rules can be extended, I have
implemented an 'address set' match pattern, where you can specify
an IP address in a format like this:

        10.20.30.0/26{18,44,33,22,9}

which will match the set of hosts listed in braces belonging to the
subnet 10.20.30.0/26 . The match is done using a bitmap, so it is
essentially a constant time operation requiring a handful of CPU
instructions (and a very small amount of memmory -- for a full /24
subnet, the instruction only consumes 40 bytes).

Again, in this commit I have focused on functionality and tried
to minimize changes to the other parts of the system. Some performance
improvement can be achieved with minor changes to the interface of
ip_fw_chk_t. This will be done later when this code is settled.

The code is meant to compile unmodified on RELENG_4 (once the
PACKET_TAG_* changes have been merged), for this reason
you will see #ifdef __FreeBSD_version in a couple of places.
This should minimize errors when (hopefully soon) it will be time
to do the MFC.
2002-06-27 23:02:18 +00:00
David E. O'Brien
95190a2df6 Add these libs from the 4.6-RELEASE.
libstdc++ was bumped with the switch to Gcc 3.1, and libpam was bumped with
the switch to OpenPAM.
2002-06-27 18:53:50 +00:00
David E. O'Brien
d320e50003 Add these libs from the 4.6-RELEASE.
libstdc++ was bumped with the switch to Gcc 3.1, and libpam was bumped with
the switch to OpenPAM.
2002-06-27 18:44:05 +00:00
Mike Silbersack
11289efd80 Fix style bugs I added in last commit.
Spotted by:	bde
2002-06-27 14:16:21 +00:00
Daniel Eischen
eee80fbd9c Remove pselect from application namespace and instead use a weak reference
to the actual implementation.  This is to allow libc_r to override
pselect() making it a cancellation point.

Prompted by: wollman
2002-06-27 13:23:46 +00:00
Daniel Eischen
53154da089 Remove improper use of <namespace.h>.
Remove fmtcheck from application name space (fix the weak reference).
2002-06-27 13:20:54 +00:00
Daniel Eischen
c40995b36a Remove improper use of <namespace.h> 2002-06-27 13:18:27 +00:00
Mike Silbersack
1228a1c634 Modify bcopy (and memcpy/memmove) so that the length value is not
re-read from the stack mid copy.  This may help mitigate the recent
Apache buffer overrun and future overruns of the sort.

Reviewed by:	jdp
MFC after:	2 days
2002-06-27 03:55:36 +00:00
Warner Losh
ecddb03f1e Remove two lines that were cvs merged that shouldn't have been. This
fixes the build.

Reported by: dillon.
2002-06-26 18:03:31 +00:00
Warner Losh
145ec10619 Remove two stray lines that snuck in the cvs merge 2002-06-26 14:18:36 +00:00
Maxim Sobolev
07a1fb30e3 Backout previous delta (addition of -I${.CURDIR}/../../sys).
Submitted by:	bde
2002-06-26 13:25:23 +00:00
Maxim Sobolev
af244dd67c Add -I${.CURDIR}/../../sys into CFLAGS, which should fix the world broken
by RLIMIT_VMEM addition.
2002-06-26 10:33:10 +00:00
Jacques Vidrine
9a370b24b5 Initialize a pointer that was left uninitialized with the previous
commit.
2002-06-26 08:48:34 +00:00
Warner Losh
d6af58f572 Include more robust checking of end of buffer that more completely
plugs the hole.
2002-06-26 08:18:05 +00:00
Warner Losh
4cbd2472b3 Don't allow buffer overflow here either. 2002-06-26 06:31:06 +00:00
Warner Losh
fda8311189 Fix a minor last, minute issue that came in after I committed.
Noticed by: nectar
2002-06-26 06:23:22 +00:00
Warner Losh
4cf0747073 Avoid remote buffer overflow on hostbuf[].
Submitted by: joost Pol <joost@pine.nl>
2002-06-26 06:04:46 +00:00
Matthew Dillon
b5c7be5728 Add documentation for vmemoryuse 2002-06-26 03:58:31 +00:00
Matthew Dillon
67577126f9 Make libutil aware of vmemoryuse in its login.conf cap processing (aka
sshd, /usr/bin/login, etc)
2002-06-26 03:54:18 +00:00
David E. O'Brien
c02ba8a8d2 WARNS=6'ify.
Style nits.
2002-06-25 18:05:16 +00:00
David E. O'Brien
ad275bd760 Prototype _start.
Submitted by:	markm

Mark some _start formal parameters __unused.
2002-06-25 18:01:12 +00:00
David E. O'Brien
cf99709c16 Update our compat libs to the 4.6-RELEASE level. 2002-06-25 04:59:48 +00:00
David E. O'Brien
05e3d9f7fc Add the [Linux] PAM modules that are still used in RELENG_4, but not -CURRENT.
These are at the 4.6-RELEASE level.

Requested by:	des
2002-06-25 04:55:07 +00:00
David E. O'Brien
7ca89f08b7 Fix a typo. 2002-06-25 04:51:12 +00:00
David E. O'Brien
8dcabf895e Add the [Linux] PAM modules that are still used in RELENG_4, but not -CURRENT.
These are at the 4.6-RELEASE level.

Requested by:	DES
2002-06-25 04:18:45 +00:00
David E. O'Brien
022f3e9092 Update our compat libs to the 4.6-RELEASE level. 2002-06-25 04:11:45 +00:00
Andrew R. Reiter
927c042095 - Remove UM_* memory handling macros as they just obfuscate code. 2002-06-24 22:29:01 +00:00
Maxime Henrion
f6a3055159 Add missing const's. 2002-06-24 13:52:26 +00:00
Dag-Erling Smørgrav
66ffb8a371 Reintroduce debugging code that somehow got lost in a previous revision. 2002-06-24 12:18:41 +00:00
Robert Drehmel
4b571b192a Fix a bug which prevented the duplication of the standard i/o
file descriptors in programs linked with libc_r with flags
other than the default ones.  This kept, inter alia, freopen()
from working correctly when reopening standard streams.

reviewed by:	deischen
PR:		misc/39377
2002-06-23 20:41:30 +00:00
Nick Hibma
074dccd545 Be more clear in error messages.
Distinguish between a held lock and a failed lock op.

If rpc.lockd is not running on a diskless client this makes clearer
what the problem is.
2002-06-23 19:23:46 +00:00
Poul-Henning Kamp
af03a3cbd6 Improve the handling of Encode and Decode operations in MD5.
Use memcpy for all little-endian architectures, sys/kern/md5c.c indicates
this should be safe for all currently supported LE archs.

Change the Encode and Decode functions for other archs to use le32toh()
and htole32() functions instead of explicit byte shuffling.

On sparc64 this gives md5(1) about 8% speed increase.
2002-06-22 12:54:11 +00:00
Dag-Erling Smørgrav
a7a4510fd8 Fix incorrect library ordering. I thought I'd committed this already... 2002-06-21 09:56:38 +00:00
Kirk McKusick
1c85e6a35d This commit adds basic support for the UFS2 filesystem. The UFS2
filesystem expands the inode to 256 bytes to make space for 64-bit
block pointers. It also adds a file-creation time field, an ability
to use jumbo blocks per inode to allow extent like pointer density,
and space for extended attributes (up to twice the filesystem block
size worth of attributes, e.g., on a 16K filesystem, there is space
for 32K of attributes). UFS2 fully supports and runs existing UFS1
filesystems. New filesystems built using newfs can be built in either
UFS1 or UFS2 format using the -O option. In this commit UFS1 is
the default format, so if you want to build UFS2 format filesystems,
you must specify -O 2. This default will be changed to UFS2 when
UFS2 proves itself to be stable. In this commit the boot code for
reading UFS2 filesystems is not compiled (see /sys/boot/common/ufsread.c)
as there is insufficient space in the boot block. Once the size of the
boot block is increased, this code can be defined.

Things to note: the definition of SBSIZE has changed to SBLOCKSIZE.
The header file <ufs/ufs/dinode.h> must be included before
<ufs/ffs/fs.h> so as to get the definitions of ufs2_daddr_t and
ufs_lbn_t.

Still TODO:
Verify that the first level bootstraps work for all the architectures.
Convert the utility ffsinfo to understand UFS2 and test growfs.
Add support for the extended attribute storage. Update soft updates
to ensure integrity of extended attribute storage. Switch the
current extended attribute interfaces to use the extended attribute
storage. Add the extent like functionality (framework is there,
but is currently never used).

Sponsored by: DARPA & NAI Labs.
Reviewed by:	Poul-Henning Kamp <phk@freebsd.org>
2002-06-21 06:18:05 +00:00
Bill Fenner
87d7b72262 Update for libpcap 0.7.1 2002-06-21 01:35:37 +00:00
Dag-Erling Smørgrav
f8bd33a0ae Don't try to dereference conn when we know it's NULL. 2002-06-19 08:36:00 +00:00
Chris Costello
1b5c321d3f Fix style and wording bugs introduced in my last commit.
Sponsored by:	DARPA, NAI Labs
2002-06-18 08:55:17 +00:00
Jake Burkholder
dbf51f8db4 Remove unneeded include of machine/emul.h. 2002-06-18 02:15:11 +00:00
Bruce Evans
3e2ec6ea88 e_pow.c:
Fixed pow(x, y) when x is very close to -1.0 and y is a very large odd
integer.  E.g., pow(-1.0 - pow(2.0, -52.0), 1.0 + pow(2.0, 52.0)) was
0.0 instead of being very close to -exp(1.0).

PR:		39236
Submitted by:	Stephen L Moshier <steve@moshier.net>

e_powf.c:
Apply the same patch although it is just cosmetic because odd integers
large enough to cause the problem are too large to be precisely represented
as floats.

MFC after:	1 week
2002-06-17 15:28:59 +00:00
Garrett Wollman
50d0eead10 Actually document pselect(3) so that Bruce can mention it in the release
notes. :-)
2002-06-17 02:21:17 +00:00
Garrett Wollman
8466ae9033 Move dillon's time conversion functions to a new header <timeconv.h>.
Since they were never documented and have never appeared in a FreeBSD
release, no repo-copy of the header is done.  This removes namespace
pollution from <time.h>.
2002-06-17 01:42:33 +00:00
Matthew N. Dodd
2b13992856 Restore local bits lost in recent merge from NetBSD. 2002-06-16 08:29:35 +00:00
Garrett Wollman
7d0f66cbc3 Add pselect(3) to the build. Need to figure out the most appropriate
way to document this interface.
2002-06-15 23:42:59 +00:00
Chris Costello
5f9c048ce7 o Move more information from BUGS into SECURITY CONSIDERATIONS and
condense the redundant bits.
o Provide an example for using snprintf over sprintf.  This may be
  supplemented with an asprintf() example soon.

Sponsored by:	DARPA, NAI Labs
2002-06-15 06:00:56 +00:00
Robert Watson
4a85ccbe6d Missed in earlier commit -- I did cvs commit src/lib/libc. Oops. 2002-06-14 04:02:25 +00:00
Robert Watson
820a52632e No POSIX.1e capabilities in the main tree yet. 2002-06-13 23:40:13 +00:00
Chris Costello
7bc7869122 Include information on the dangers of passing a user-supplied string as
a format string.  This will later on be changed to a reference to the
FreeBSD Security Architecture after it has been committed.

PR:		docs/39320
Sposnored by:	DARPA, NAI Labs
2002-06-13 23:35:22 +00:00