Commit Graph

7093 Commits

Author SHA1 Message Date
Juli Mallett
9e8f2a17ec WARNS ?= 2, so idiocy like 1.12 of type.c doesn't have to happen again. 2003-01-30 00:11:01 +00:00
Juli Mallett
9e4789cc2f Missing "return 0"
Big pointy hat to:	jmallett
Spotted by:		peter
2003-01-30 00:10:24 +00:00
Juli Mallett
7dc95357f8 API for opening (and tracking) writable file descriptors per disk. 2003-01-29 23:19:46 +00:00
Jacques Vidrine
8f857e88c4 Do not return inappropriate error codes in pam_sm_setcred. 2003-01-29 21:20:38 +00:00
Mark Murray
cb9c19ff86 Adjust for OpenSSL 0.9.7. 2003-01-28 23:03:15 +00:00
Dag-Erling Smørgrav
930105c1e9 style(9): add parentheses to sizeof even when not strictly required.
MFC after:	3 days
2003-01-28 08:04:40 +00:00
John W. De Boskey
9015b953d6 Fix signed/unsigned comparison warning/error from 'make release' 2003-01-28 00:33:53 +00:00
Martin Blapp
2e26eba4b9 Fix signed/unsigned comparison warnings.
Reviewed by:		phk
Obtained from:		NetBSD
2003-01-27 22:46:50 +00:00
Martin Blapp
3c788545e8 Fix signed/unsigned comparison warnings. Fix spelling error in
comment.

NetBSD Rev. 1.9 and 1.7

Reviewed by:		phk
Obtained from:		NetBSD
2003-01-27 22:45:08 +00:00
Martin Blapp
33e0ae486e Make this work in the !INET6 case -- if we mismatch the AF, don't return a
bogus (uninitialized) structure. Also, ignore v4 ifa's with no broadcast
address (rather than core dumping).

NetBSD Rev 1.8

Reviewed by:		phk
Obtained from:		NetBSD
2003-01-27 22:43:23 +00:00
Martin Blapp
d063ef1461 Check pmap_flag before sendto.
NetBSD r 1.5

Reviewed by:		phk
Obtained from:		NetBSD
2003-01-27 22:38:25 +00:00
Martin Blapp
555f4cffb0 Make sure we don't look before the beginning of the string.
NetBSD Rev 1.5

Reviewed by:		phk
Obtained from:		NetBSD
2003-01-27 22:36:53 +00:00
Martin Blapp
77335102aa Add missing __rpc_fixup_addr. This is needed to make
mount_nfs -T work for scoped addresses.

NetBSD Rev 1.11

Reviewed by:	phk
Obtained from:	NetBSD
2003-01-27 22:27:55 +00:00
Martin Blapp
b951fbe40c Free the correct buffer in error handling.
Handle that malloc may return NULL.

NetBSD Rev. 1.8

Reviewed by:		phk
Obtained from:		NetBSD
2003-01-27 22:22:59 +00:00
Martin Blapp
40525d3deb Reset the record lenght and received bytes once a record
is finished. This fixes clients doing two RPCs over the
same connection at the same time. Without this fix, we
could end with a reply to old data.

Submitted by:	Frank van der Linden <fvdl@netbsd.org>
Reviewed by:	rwatson
Obtained from:	NetBSD
2003-01-27 22:19:32 +00:00
Andrey A. Chernov
5fe03aba37 Now return NULLified struct in case of empty config file
(previous variant return NULL pointer for both empty file case and error case,
so caller can't sense error properly).

It not affect existen programs because property_find() now returns NULL
for both NULL pointer and NULLified struct.
2003-01-27 03:39:33 +00:00
Andrey A. Chernov
33a155e400 Handle read errors 2003-01-27 03:14:04 +00:00
Juli Mallett
fe8b86a06d If we don't know where the sblock is (e.g. filling out a blank disk), then
get it from the fs structure.  Really libufs should have interfaces to generate
both what we export, and what we import, based on eachother, and this should
be full of redundant code to make sure everything is right...  But really, we
don't even deal with checksums, so plenty of room to improve.
2003-01-27 01:57:15 +00:00
Mark Murray
7c55188ab2 Very minor EOL whitespace diff-reducer. 2003-01-26 23:34:47 +00:00
Mark Murray
aa4e3f3e5a Missed a bit of cleanup. 2003-01-26 23:29:22 +00:00
Mark Murray
818c8b696b make these more useful for lint(1). Minor diff-reductions while I'm
about it.
2003-01-26 23:14:47 +00:00
Martin Blapp
0ae0e1ea47 Fix namespace pollution introduced in previous commit.
Reviewed by:		phk
2003-01-26 23:01:49 +00:00
Mark Murray
34893fe49b Remove the get_term() function. It pretty much can't work for
FreeBSD, and makes ugly diffs with the other crt1.c's. Leave
behind a comment (words supplied by Thomas Moestl) that explain
the issue.

OK'ed by:	tmm
2003-01-26 23:01:36 +00:00
Alfred Perlstein
b17c9cfa5e Add const qualifier to data argument for msgsnd.
PR: standards/45274
Submitted by: Craig Rodrigues <rodrigc@attbi.com>
2003-01-26 20:09:34 +00:00
Tim J. Robbins
21a1863da8 Remove part of my stateful locale patch that slipped into the previous rev. 2003-01-26 11:45:54 +00:00
Tim J. Robbins
c297498757 Initial implementation of the C99 feature whereby calling freopen() with
a NULL filename argument allows a stream's mode to be changed. At the
moment it just recycles the old file descriptor instead of storing the
filename somewhere and using that to reopen the file, as the standard
seems to require. Strictly conforming C99 applications probably can't
tell the difference but POSIX ones can.

PR:		46791
2003-01-26 10:01:59 +00:00
Alfred Perlstein
e1d7d0bb60 Bring shm functions closer the the opengroup standards.
PR: 47469
Submitted by: Craig Rodrigues <rodrigc@attbi.com>
2003-01-25 21:33:05 +00:00
Alfred Perlstein
3beb32709d Bring semop() closer the the opengroup standards.
PR: 47471
Submitted by: Craig Rodrigues <rodrigc@attbi.com>
2003-01-25 21:27:37 +00:00
Mike Barcroft
3f049d395e Add an MLINK malloc.conf(5) -> malloc(3). 2003-01-24 13:58:56 +00:00
Max Khon
1746ea2b02 remove #ifdef _THREAD_SAFE 2003-01-24 01:46:30 +00:00
Juli Mallett
3ff1f264e9 bwrite, not sbwrite, needs to open for writing and write. 2003-01-23 23:58:22 +00:00
Juli Mallett
d934deeff9 API to fillout a blank disk. For e.g. newfs. 2003-01-23 21:32:56 +00:00
Poul-Henning Kamp
e0c2da42ec For "sensitive" processes, we always set the 'A' flag which causes abort()
to be called on first sight of trouble.

"sensitive" is somewhat arbitrarily defined as "setuid, setgid, uid == root
or gid == wheel".

The 'A' option carries no performance penalty.

It is not possible to override this setting: fix the program instead.

Absentmindedly nodded OK to by:    various
2003-01-23 21:26:47 +00:00
Dag-Erling Smørgrav
0ab4a51e4e Document .netrc support. 2003-01-22 18:27:25 +00:00
Dag-Erling Smørgrav
9f808a4dd0 Hook in the .netrc code + don't use pointers as if they were booleans. 2003-01-22 17:54:49 +00:00
Dag-Erling Smørgrav
07350d12cf Experimental support for .netrc. 2003-01-22 17:53:58 +00:00
Dag-Erling Smørgrav
02e6bec10b Initialization paranoia. 2003-01-22 17:53:15 +00:00
Dag-Erling Smørgrav
591c019988 A negative offset means "get it all". 2003-01-22 17:52:27 +00:00
Maxim Konovalov
f2fe707f21 Remove EOL whitespaces. 2003-01-20 11:30:08 +00:00
Maxim Konovalov
9028092dc5 o Fix a typo.
o Prepend a function name by .Fn macro.

Reviewed by:	archie
2003-01-20 11:28:41 +00:00
Juli Mallett
cc3dd52898 Store not only the current cylinder group in the series (i.e. next that needs
to be read in) but also the last cylinder group in the series (i.e. what is
stored in the structure).
2003-01-19 05:46:23 +00:00
Andrey A. Chernov
779092a489 Add (unsigned char) cast to ctype macros
Handle NULL return from malloc and strdup
2003-01-19 03:05:01 +00:00
Juli Mallett
e3e8d2ca45 Don't crash when utilities are dumb and try to read less than the disk block
size (dumpfs may try to read the cylinder size (or is is sector size?) by way
of bread).  Prevents a bounds error.
2003-01-19 01:39:53 +00:00
Juli Mallett
22ec2ef3bb Add facility to read one, or a string of, cylinger groups. 2003-01-19 01:31:26 +00:00
David E. O'Brien
0f38d8d9aa Sync with NetBSD -- sl_add() now returns an int. 2003-01-19 01:16:01 +00:00
Juli Mallett
656128586d Hunt for a disk to operate on, if we're passed a partition mountpoint, etc.
Concept reviewed by:	phk
2003-01-19 00:43:17 +00:00
David E. O'Brien
bd2d1003c1 Use __FBSDID. 2003-01-19 00:17:03 +00:00
David E. O'Brien
5cafcbb49b We don't need our own personal definition of __CONCAT. 2003-01-18 23:26:04 +00:00
Juli Mallett
063a27dc9b Fix typo. 2003-01-18 05:06:07 +00:00
Juli Mallett
49b2a6863b Nuke dumb error reporting code, people can just use disk::d_error. Unify the
DEBUG and d_error initialisation into an ERROR macro, which can both trace and
set the d_error field.  Much a more meaningful thing, I should say.
2003-01-18 04:22:14 +00:00
Thomas Moestl
1902ba0c83 Document that listen() can return EINVAL now. 2003-01-17 19:25:27 +00:00
Tim J. Robbins
0cff97c8bc Do a better job of documenting mincore(2), esp. the MINCORE_* flags. 2003-01-17 04:06:57 +00:00
Martin Blapp
9790dbfc0f Fix memleak.
Reviewed by:	rwatson
MFC after:	2 weeks
2003-01-16 16:43:58 +00:00
Martin Blapp
08497c026c Implement non-blocking tcp-connections.
Reviewed by:	rwatson
Obtained from:	NetBSD
MFC after:	1 day
2003-01-16 07:13:51 +00:00
Johan Karlsson
de216a83c2 realpath(3) should use PATH_MAX instead of MAXPATHLEN according to POSIX.
This also reverts the PATH_MAX -> MAXPATHLEN part of
rev 1.3 of src/bin/realpath/realpath.c

Requested by:	imp
Reviewed by:	imp, bde
2003-01-15 21:22:55 +00:00
Tim J. Robbins
5b8dbaa1f9 Add a missing word. 2003-01-15 09:48:15 +00:00
Tim J. Robbins
bae7e9ec5e Document the named semaphore functions. This could still use a bit
of polishing.
2003-01-15 03:07:40 +00:00
Chris Costello
5bc8d71283 Actually add mac_prepare.3.
Sponsored by:	DARPA, Network Associates Laboratories
2003-01-15 03:05:21 +00:00
Chris Costello
8f8690e73b Cross-reference mac(4)
Sponsored by:	DARPA, Network Associates Laboratories
2003-01-15 03:03:05 +00:00
Chris Costello
c75fc22921 s/SEE_ALSO/SEE ALSO/
Cross-reference mac(4) and mac(9)

Sponsored by:	DARPA, Network Associates Laboratories
2003-01-15 03:02:30 +00:00
Chris Costello
76a829fd1d o Document mac_prepare() and associated functions
o Link mac_get_pid.3 to mac_get.3
o Update SEE ALSO to refer to mac_prepare, and added missing references
o Remove clause #3 on my work
o Update mac_get.3 for the updated MAC API

Sponsored by:	DARPA, Network Associates Laboratories
Obtained from:	TrustedBSD Project
2003-01-15 00:45:31 +00:00
Chris Costello
e4ee15b13f o Remove clause #3
o Document mac_set_link().

Sponsored by:	DARPA, Network Associates Labs
2003-01-14 23:20:40 +00:00
Tim J. Robbins
74e03642ee Back out previous; sharing semaphores between processes only works
in certain special cases.
2003-01-14 07:14:06 +00:00
Tim J. Robbins
ab099bd309 Sharing semaphores between processes works now, so remove the stale comments
about it always returning EPERM. Document that ENFILE occurs when the
limit on kernel semaphores is reached.
2003-01-14 04:12:33 +00:00
Tim J. Robbins
51f2ddd7af Cross reference sem(4) so users know which kernel options are required
to use these semaphore functions.
2003-01-14 03:39:09 +00:00
Tim J. Robbins
a91b25dc1c Add the newly created semaphore to the named semaphore list in sem_open()
so that multiple opens of the same semaphore without an intervening
sem_close() return the same object, and so that sem_close() does not
segfault while trying to remove the item from the list.
2003-01-14 03:36:45 +00:00
Tim J. Robbins
7a1dd698e8 Including <time.h> before <aio.h> has not been necessary for a while now. 2003-01-14 02:37:06 +00:00
Joerg Wunsch
b4206324a5 Mention the oddities and requirements for mount operations executed by
non-root users.

PR:		docs/42651
Submitted by:	Thomas Seck <tmseck@netcologne.de>
MFC after:	3 days
2003-01-13 19:42:21 +00:00
Tim J. Robbins
d8b504e33c Refer to 1003.1 instead of 1003.2 in the Standards section. 2003-01-13 10:37:11 +00:00
Tim J. Robbins
2c19171bc1 Lock the stream before calling __sfileno() to retrieve the file descriptor.
1003.1-2001 requires that fileno() behave as if it locks the stream.
2003-01-13 02:58:18 +00:00
Tim J. Robbins
83bb3b4979 Add missing word to "Return Values" section. 2003-01-13 01:29:14 +00:00
Mike Barcroft
0f0ca6ffc9 Fix struct iovec documentation to match reality.
Submitted by:	Craig Rodrigues <rodrigc@attbi.com>
2003-01-12 15:18:47 +00:00
Tim J. Robbins
b0efb842b9 Add a manual page for the lio_listio() syscall. Still needs a bit
of polishing.
2003-01-12 09:28:16 +00:00
Marcel Moolenaar
42cf585a69 Implement missing fpgetround() and fpsetround(). 2003-01-11 07:24:54 +00:00
Matthew Dillon
57e6d29b1e Remove all use of the LOG2() macro/inline, undoing some non-optimal cruft
that crept in recently.  GCC will optimize the divides and multiplies for us.

Submitted by:	David Schultz <dschultz@uclink.Berkeley.EDU>
MFC after:	1 day
2003-01-11 01:09:51 +00:00
Daniel Eischen
c54f72859c Increase the scheduler stack to 4 pages. This should prevent a stack
overflow when dumping thread info (generated by receipt of SIGINFO).

Reported by:	jmallet
2003-01-11 00:43:20 +00:00
John Baldwin
f3c6522625 Use the fstype obtained from the GEOM dumpconf output to set the fstype
of BSD part chunks when opening a disk.

Reviewed by:	phk
MFC after:	2 days
2003-01-10 19:45:10 +00:00
John Baldwin
53465bf736 - Make New_Disk() non-static so it can be used in Create_Chunk_DWIM().
- In Create_Chunk_DWIM(), if there is a freebsd chunk that has no
  children chunks, then trying to add a child part chunk will fail even
  though there is free space.  Handle this special case by adding an
  unused chunk the full size of the freebsd chunk as a child of the
  freebsd chunk before adding the new part chunk.  This situation can
  happen when changing the type of an existing slice to be a FreeBSD
  slice type or when installing onto a blank disk on Alpha (which has
  no slices.)

Reviewed by:	phk
MFC after:	2 days
2003-01-10 19:25:38 +00:00
Jacques Vidrine
e0bc74123b About September 2001, I consulted with all the previous authors of
pam_krb5 to consolidate the copyright texts.  The semi-official
pam_krb5 module has been distributed with this new license text ever
since, but I'm just now getting around to updating the text here.
2003-01-10 13:38:44 +00:00
Tim J. Robbins
c24891e9e2 The macro versions of putc() and putchar() are gone. 2003-01-10 07:47:12 +00:00
Tim J. Robbins
9031030003 There is no macro version of getc() anymore. 2003-01-10 07:45:24 +00:00
Tim J. Robbins
72c9dabbb7 Bring the list of function-like macros up to date with reality. 2003-01-10 07:38:38 +00:00
Alfred Perlstein
d2b9b6b10c spell multiple correctly. 2003-01-10 06:52:19 +00:00
Tim J. Robbins
4549f62011 Document clearerr_unlocked(), feof_unlocked(), ferror_unlocked()
and fileno_unlocked().
2003-01-10 06:22:28 +00:00
Tim J. Robbins
4d844c09ac Add a manual page for flockfile(), ftrylockfile(), and funlockfile(). 2003-01-10 05:34:11 +00:00
Tim J. Robbins
cbee408df1 Document getc_unlocked(), getchar_unlocked(), putc_unlocked(),
and putchar_unlocked().
2003-01-10 04:56:20 +00:00
Tim J. Robbins
a5b0089e65 Add function versions of getchar_unlocked(), getc_unlocked(),
putchar_unlocked(), putc_unlocked(), feof_unlocked(), ferror_unlocked(),
clearerr_unlocked(), and fileno_unlocked(). The first four are required
by POSIX. The rest are provided for consistency.
2003-01-10 04:35:08 +00:00
Tim J. Robbins
098b8611cb Avoid a memory leak by using reallocf() instead of realloc(). 2003-01-10 02:58:25 +00:00
Tim J. Robbins
73e8989de8 Prototype __getcwd() to avoid a warning. 2003-01-10 02:54:37 +00:00
Tim J. Robbins
826f01cb9e #include <ctype.h> for prototypes (or macro versions) of
tolower() and isdigit().
2003-01-10 02:46:32 +00:00
Max Khon
f7ed1917e2 pthread_attr_get_np() now takes 'pthread_t' (not 'pthread_t *')
to be consistent with other pthread_XXX functions
2003-01-07 21:43:30 +00:00
Chris Costello
6e238d7604 Correct a couple small typos.
Submitted by:	Attila Nagy <bra@fsn.hu>
2003-01-07 13:18:21 +00:00
Chris Costello
d69f82076b Document the file system firewall interface library functions.
Sponsored by:	DARPA, Network Associates Laboratories
2003-01-07 11:23:43 +00:00
Tim J. Robbins
6398b9c017 #include "namespace.h" to get a prototype for _err(). 2003-01-07 06:55:58 +00:00
Tim J. Robbins
16fdde11b7 Remove an unused variable: mbresult. 2003-01-07 06:20:47 +00:00
Tim J. Robbins
0b4b7b65ed #include <stdlib.h> for free()'s prototype. 2003-01-07 06:17:13 +00:00
Tim J. Robbins
2005f192e5 Use hidden names (_close, _dup2, _waitpid, etc.) where appropriate. 2003-01-07 06:07:56 +00:00
Tim J. Robbins
cdfbf19246 Add waitpid to the list of hidden names for use by wordexp.c and grantpt.c. 2003-01-07 06:05:35 +00:00
Giorgos Keramidas
a58d3725ee Typo fixes.
PR:		docs/46815
Submitted by:	SUZUKI Koichi <koich@cac.co.jp>
2003-01-07 05:06:27 +00:00
Tom Rhodes
dc3b2f9d33 Remove redundant documenation.
PR:		46253
Submitted by:	Jeroen Ruigrok van der Werven <asmodai@wxs.nl>
2003-01-06 23:20:55 +00:00