Commit Graph

1729 Commits

Author SHA1 Message Date
Bruce Evans
03dcee8db1 Fixed errors in the Lite2 merge. Some style changes were mismerged.
My changes to preserve errno across free() and close() and to report
fstat() errors properly were blown away.

Updated the FreeBSD changes to match the Lite2 style fixes.
1997-03-12 12:35:44 +00:00
Peter Wemm
beb9f61579 Fix problem with FD_SET* overflow reporting.. Perror() didn't have enough
args, and errno hasn't actually been set so it probably doesn't make sense
to report it via strerror().

Pointed out by: bde
1997-03-12 11:10:54 +00:00
Peter Wemm
9547ea9f3a _res_close() -> res_close()
Pointed out by: bde
1997-03-12 11:02:00 +00:00
Bruce Evans
e1dfe717ec Document that popen() uses a bidirectional pipe (in FreeBSD) and not a
socket pair (as in Lite2).
1997-03-11 19:28:24 +00:00
Bruce Evans
035e5608d5 Fixed cleaning up after malloc failure, which was broken by Lite2.
We don't use socketpair(), so don't #include <sys/socket.h>.

Restored some gcc-quieting parentheses that were lost in the Lite2 merge.
1997-03-11 18:51:43 +00:00
Bruce Evans
1662ffff99 Install the Lite2 getvfsbyname.3. The old getvfsbyname() interface is
still available and described in getvfsent.3.
1997-03-11 18:20:06 +00:00
Bruce Evans
6d50b78d4d Fixed #include's in synopsis. 1997-03-11 18:16:02 +00:00
Peter Wemm
adf6ad9e69 Merge from Lite2:
filesystem include updates, duplicate group suppression, cleanups,
  filesystem whiteout support (unionfs), bidir popen().
1997-03-11 11:52:33 +00:00
Peter Wemm
0014b4c0e1 Merge from Lite2: man page updates 1997-03-11 11:47:52 +00:00
Peter Wemm
1edb99c337 Merge from Lite2 (YAMFL2? :-)
Document that popen() can now create bidirectional pipes and handles.
Note that this needs to be updated since we have a native bidirectional
pipe and don't use socketpair() here.
1997-03-11 11:46:19 +00:00
Peter Wemm
e5574dc8c0 Merge from Lite2 (+realpath.3) 1997-03-11 11:42:56 +00:00
Peter Wemm
4ace1b5205 Merge from Lite2 (whiteout/unionfs) 1997-03-11 11:41:46 +00:00
Peter Wemm
4f02b68a12 Merge from Lite2 1997-03-11 11:40:40 +00:00
Peter Wemm
4381233dc5 Merge Lite2 changes 1997-03-11 11:39:58 +00:00
Peter Wemm
9dc1164189 merge from Lite2 - realpath() now shares a lot of code with getcwd()
and is now in the same file.
1997-03-11 11:37:59 +00:00
Peter Wemm
5faf00b5da Merge from Lite2 onto mainline -
- add undelete() and undelete.2 (requires libc minor bump some time)
  - man page updates
1997-03-11 11:35:56 +00:00
Peter Wemm
e5493ddb0f This commit was generated by cvs2svn to compensate for changes in r23658,
which included commits to RCS files with non-trunk default branches.
1997-03-11 11:29:42 +00:00
Peter Wemm
662909a780 Import CSRG 4.4BSD-Lite2 lib/libc onto vendor branch 1997-03-11 11:29:42 +00:00
Peter Wemm
0b7ae03c1a Import CSRG 4.4BSD-Lite2 includes onto vendor branch 1997-03-11 11:11:37 +00:00
Guido van Rooij
1ab96f9344 Check for overflow of FD_SET 1997-03-10 19:32:46 +00:00
Bill Paul
09e8462819 Fix brain-o in SunOS passwd.adjunct stuff: !strstr(s, "##") is a) bad
style and b) the wrong logic. Should be strstr(s, "##") != NULL. (Note
that the passwd.adjunct stuff has not been merged into 2.2 so this bug
is not in that branch.)
1997-03-10 16:47:19 +00:00
Bruce Evans
9faa8dc6cc Use __ieee754_sqrt() instead of sqrt() internally. Similarly for the
float versions.  Using sqrt() was inefficient.

Obtained from:	NetBSD
1997-03-09 16:29:29 +00:00
Bruce Evans
6b04d9918b Include <machine/asm.h> instead of kernel-only <machine/asmacros.h>. 1997-03-09 14:01:11 +00:00
Stephen McKay
ac225cf76d Clarified the behaviour of dup2(fd1,fd2) when fd1==fd2 and when fd1 is invalid.
Safe for 2.2!
1997-03-09 13:16:48 +00:00
Mike Pritchard
2d3868141d The first argument to fts_set was wrong. Part of PR# 2917. 1997-03-09 00:43:49 +00:00
Mike Pritchard
e2493e0fc3 Pause() is made obsolete by sigsuspend(2), not sigpause(3).
Part of PR# 2917.
1997-03-09 00:42:46 +00:00
Paul Traina
845c706cee Install opie.h in /usr/include 1997-03-08 19:42:41 +00:00
Wolfram Schneider
4ccb26e49a Allow comments in group database.
The character `#' introduces a comment. Leading spaces and tabs are
ignored: '^[ \t]*#.*\n$'

Count an empty line - only spaces, tabs or newline - also as a comment.
(to be compatibel with password database comments). '^[ \t]*\n$'
1997-03-08 16:21:40 +00:00
Paul Traina
1a277b7ae9 API cleanups (use const char * where appropriate)
Cannidate for: 2.2 (please!)
1997-03-08 06:22:51 +00:00
Mike Pritchard
e42337987f Add a missing semi-colon.
Submitted by:	jmg
1997-03-07 06:15:54 +00:00
Bruce Evans
8c950c10ca Fixed wrong magic numbers in scaling. hypotf() was very broken for large
and small values:

    hypotf(2.3819765e+38, 2.0416943e+38) was NaN instead of 3.1372484e+38
    hypotf(-3.4028235e+38, 3.3886450e+38) was NaN instead of Inf
    hypotf(-2.8025969e-45, -2.8025969e-45) was 0 instead of 4.2038954e-45

Found by:	ucbtest
1997-03-05 11:54:00 +00:00
Andrey A. Chernov
1e12d1c9d9 Remove words about lower limit needed (from BUGS section), we have
precise limit now
1997-03-03 23:50:55 +00:00
Bruce Evans
e836e480dc Fixed handling of input failure by the scanf family.
- 0 was returned instead of EOF when an input failure occured while
  skipping white-space after 0 assignments.  This fixes PR2606.  The
  diagnosis in PR2606 is wrong.
- EOF was returned instead of 0 when an input failure occurred after
  zero assignments and nonzero suppressed assignments.
- EOF was spelled -1.

This should be in 2.2.
1997-03-03 17:53:02 +00:00
Warner Losh
59e5dcc34f Use .Sq Li \&\e0 rather than NUL to describe the character with no bits
set, as suggested by Garrett Wollman.   This is more consistant with how
things like strncpy are done, as well as harder to confuse NUL and NULL.
1997-03-03 15:39:06 +00:00
Bruce Evans
cdd42308ce Enabled the Lite2 getvfsbyname(). It's actually named new_getvfsbyname()
for now so that we don't lose library compatibility.  Applications should
define _NEW_VFSCONF and use getvfsbyname() instead of new_getvfsbyname()
if they want the new vfsconf interface.  Parts of the old interface
(enough to load vfs modules, I hope) are still available.
1997-03-03 13:08:33 +00:00
Andrey A. Chernov
ee58dcaeb3 Use stricter MAXLOGNAME now 1997-03-03 09:52:26 +00:00
Andrey A. Chernov
216a8ce058 Reflect current MAXLONGNAME value and specify that null included 1997-03-03 09:17:16 +00:00
Andrey A. Chernov
09f3779132 Don't add/subtract 1 to MAXLOGNAME, it is already NUL-terminated 1997-03-03 08:11:28 +00:00
Mike Pritchard
10fd17786f Change vfc_typenum back to vfc_index in response to bde's
commit to getvfsent.c rev 1.10.
1997-03-03 06:02:54 +00:00
Bruce Evans
0df382bd0f Changed vfc_typenum back to vfc_index. The old vfsconf struct is now
visible again, and the new vfsconf struct didn't match reality.
1997-03-03 05:53:54 +00:00
Andrey A. Chernov
c3e7a0efd1 MAXLOGNAME currently 16, not 12 1997-03-02 21:47:03 +00:00
Warner Losh
8f58838644 Pendantic change of null to NUL. Also warn that this function does not
NUL terminate in the case of buffer overflow.
1997-03-02 20:07:37 +00:00
Bruce Evans
08f68ac6a6 Attempt to import Lite2's getvfsbyname.c. 1997-03-02 18:13:14 +00:00
Bruce Evans
095777c6a0 This commit was generated by cvs2svn to compensate for changes in r23291,
which included commits to RCS files with non-trunk default branches.
1997-03-02 18:13:14 +00:00
Mike Pritchard
6e11b43020 getnetbyaddr now takes an unsigned long as its first argument. 1997-02-28 06:28:53 +00:00
Mike Pritchard
7dbe27136f Oops! I accidently commited a change that wasn't ready for prime
time yet. Revert to rev 1.2.
1997-02-28 06:26:26 +00:00
Mike Pritchard
cd1b6738ab The struct vfsconf element vfc_index is now vfs_typenum. 1997-02-28 06:22:29 +00:00
Mike Pritchard
28f86af297 Correct the xref section - it was incorrectly using .Fn instead
of .Xr for the xrefs.
1997-02-28 05:46:19 +00:00
Andrey A. Chernov
65f50b7f27 "infinity" check was missed from login_getcapsize(), add it
One manifestation of this bug: all networking users have coredumpsize=0
1997-02-27 00:24:05 +00:00
Warner Losh
2a62f02315 Buffer overflow from DNS name information which could cause root access
when called from lpd.

Reviewed by:	jkh, pst
Submitted by:	Oliver Friedrichs <oliver@secnet.com>
1997-02-26 06:12:34 +00:00
Bruce Evans
5d8d8dd3b6 Use the C library version of log10() instead of the inaccurate formula
log10(x) = log10e * log(x).  This fixes some small (one or two ULP)
inaccuracies.

Found by:	ucbtest
1997-02-24 17:44:08 +00:00
Bruce Evans
9e2d0733c5 Oops, I thought I was fixing the double precision lg10 in the
previous revision.  Use log10f() instead of log10().  log10f() is
currently slightly slower than log10() on P5's, but it is potentially
significantly faster.

Fixed declaration of the C function used in the (unused?) KR_headers
case.
1997-02-24 17:35:33 +00:00
Peter Wemm
7e546392b5 Revert $FreeBSD$ to $Id$ 1997-02-22 15:12:41 +00:00
Peter Wemm
b97fa2ef50 Revert $FreeBSD$ to $Id$ 1997-02-22 14:13:04 +00:00
Peter Wemm
57ece64fc6 Back out an easy $FreeBSD$ 1997-02-22 11:38:21 +00:00
Bruce Evans
2e6184e901 Split up the Bessel function wrapper files so that most wrapper functions
are in their own file.
1997-02-20 13:35:15 +00:00
Bruce Evans
5ddc00e218 Removed misplaced duplicate of comment about implementation details. 1997-02-20 13:14:06 +00:00
Bruce Evans
487ddb8fa4 Compute (1 - x^2) as ((1 - x) * (1 + x)) instead of as (1 - x * x) to
avoid easily avoidable loss of precision when |x| is nearly 1.

Extended (64-bit) precision only moves the meaning of "nearly" here.

This probably could be done better by splitting up the range into
|x| <= 0.5 and |x| > 0.5 like the C version.  However, ucbtest
does't report any errors in this version.  Perhaps the C version
should be used anyway.  It's only 25% slower now on a P5, provided
the C version of sqrt() isn't used, and the C version could be
optimized better.

Errors checked by:	ucbtest
1997-02-20 12:37:49 +00:00
Daniel O'Callaghan
589dde865b Typogrammatical error 'with' -> 'when'.
This could be put into 2.2.
1997-02-20 06:50:31 +00:00
Wolfram Schneider
b8dc034799 Add forgotten man page link fts_set.3 -> fts.3 1997-02-16 22:32:13 +00:00
Bruce Evans
dab159e3d6 Select between the generic math functions and the i387-specific ones
at runtime.

etc/make.conf:
Nuked HAVE_FPU option.

lib/msun/Makefile:
Always build the i387 objects.  Copy the i387 source files at build
time so that the i387 objects have different names.  This is simpler
than renaming the files in the cvs repository or repeating half of
bsd.lib.mk to add explicit rules.

lib/msun/src/*.c:
Renamed all functions that have an i387-specific version by adding
`__generic_' to their names.

lib/msun/src/get_hw_float.c:
New file for getting machdep.hw_float from the kernel.

sys/i386/include/asmacros.h:
Abuse the ENTRY() macro to generate jump vectors and associated code.
This works much like PIC PLT dynamic initialization.  The PIC case is
messy.  The old i387 entry points are renamed.  Renaming is easier
here because the names are given by macro expansions.
1997-02-16 18:26:31 +00:00
Bruce Evans
799e5901b3 Use the C library version of log10() instead of the inaccurate formula
log10(x) = log10e * log(x).  The formula would work if the RHS were
evaluated in extended precision with an extended precision log().
This actually happened with the i387 log() because it returns excess
precision.

Found by:	ucbtest
1997-02-16 17:54:58 +00:00
Bruce Evans
72d8d94d6f Fixed the i87 version of exp(). It returned NaN for args +-Inf. It had
some small (one or two ULP) inaccuracies.

Found by:	ucbtest
1997-02-16 17:38:11 +00:00
Jordan K. Hubbard
c4ebcb3423 Put back .endif clobbered by the previous commit, breaking the
build.
1997-02-15 14:05:42 +00:00
Daniel O'Callaghan
d53ec6c0d0 Reviewed by: Bruce Evans <bde@freebsd.org>
Guard against possible buffer overrun in filename passed.
Another candidate for 2.2.
1997-02-15 07:10:26 +00:00
David Nugent
a60c8a80bc Allow commonly-used "insecure" as a valid keyword in /etc/ttys.
This prevents keywords after "insecure" occurs being errnoeously
parsed as comments.
1997-02-15 05:45:00 +00:00
Bruce Evans
ec7d3a3282 Disabled the i387 version if log1p(). It just evaluates log(1 + x).
This defeats the point of log1p().  ucbtest reports errors of +-5e+15
ULPs.  A correct version would use the i387 fyl2xp1 instruction for
small x and maybe scale to small x.  The C version does the scaling
reasonably efficiently, and fyl2px1 is slow (at least on P5s), so not
much is lost by always using the C version (only 25% for small x even
with the broken i387 version; 50% for large x).
1997-02-15 05:21:16 +00:00
Bruce Evans
b416939d71 Moved definitions of PIC macros from SYS.h to DEFS.h so that SYS.h
doesn't need to be included in files that have nothing to do with
syscalls.

Added missing `.text' to START_ENTRY so that ENTRY() works when
invoked in the data section.
1997-02-14 10:57:07 +00:00
Adam David
590f415db7 lite2 remame: vfc_index --> vfc_typenum 1997-02-12 01:34:38 +00:00
David Nugent
e9039c38dc Obsolete fgetline() -> fgetln(); and chop off newline if necessary. 1997-02-10 16:32:03 +00:00
Mike Pritchard
be619c7fbd Update to reflect new Lite2 mount.h and friends. 1997-02-10 07:36:00 +00:00
Mike Pritchard
4cb0cd1bb5 Update to reflect new Lite2 mount.h. 1997-02-10 07:29:25 +00:00
Andrey A. Chernov
e799281533 Move _PathLocale to data-only file, so setrunelocale() not pick up
whole setlocale.c module now.

Should go into 2.2
1997-02-09 09:29:27 +00:00
Warner Losh
5480d8d5c2 Fix PR2579: potential security hole in rcmd.c
Submitted by:	Julian Assange
1997-02-09 06:54:46 +00:00
Joerg Wunsch
cc551f25f4 Do Andrey's homework :) before merging this into 2.2:
. add idempotency #ifdef
. avoid sloppy common-style external declaration.
1997-02-08 14:04:30 +00:00
Andrey A. Chernov
b195036087 Include "setlocale.h" for _PathLocale like other parts already did
Should go in 2.2
1997-02-07 13:05:51 +00:00
Paul Traina
00a825f736 Activate libopie 1997-02-07 03:58:36 +00:00
Paul Traina
8c80565e0f Build libopie from contrib_opie module. 1997-02-07 03:51:56 +00:00
Paul Traina
ae7c505681 Config information for FreeBSD 1997-02-07 03:46:28 +00:00
Andrey A. Chernov
939aed4fb5 Comment out PATH_LOCALE reference
Should go into 2.2
1997-02-06 09:29:02 +00:00
Andrey A. Chernov
63407d3487 Use symbolic constants instead of hardcoded digits
Add range check for setrunelocale since it can be called
directly.
Remove _startup_setlocale compatibility function

Should go into 2.2
1997-02-06 09:11:06 +00:00
Paul Traina
b6b0d266cd Fix yet another setlocale() bug.
Submitted by:	Wojtek Pilorz <wpilorz@celebris.bdk.lublin.pl>
1997-02-06 08:31:42 +00:00
Julian Elischer
c840cec7c5 Submitted by: John Birrell
uthreads update from the author.
1997-02-05 23:26:09 +00:00
Andrey A. Chernov
628abd1b29 Add XXX comment describing potential memset non-portable issue
Nitpicked-by: joerg
1997-02-05 20:54:16 +00:00
Andrey A. Chernov
e56a1af623 Update the comment why range checking is not needed
Should go in 2.2
1997-02-05 19:22:04 +00:00
Andrey A. Chernov
d81a091605 Update the comment why range checking not needed
Fix setrunelocale fail if called directly without prior setlocale
call

Should go in 2.2
1997-02-05 19:17:10 +00:00
David Greenman
5979500afc Killed getenv of PATH_LOCALE per Andrey's suggestion. It was intended
for debugging locale stuff, but was rarely if ever used...and of course
just bit a big chunk out of our collective hind-ends.
1997-02-05 09:53:25 +00:00
Satoshi Asami
d649be870e 1MB is 1048576 bytes, not 1038476 bytes. (I can see that the original
committer wasn't using the MicroSlop Natural keyboard though! :)
1997-02-05 06:06:15 +00:00
Andrey A. Chernov
2b3e51b901 Add yet one comment saying that range checking already done
to stop people "fixing" it by snprintf
1997-02-03 08:29:32 +00:00
Paul Traina
2ed98aa017 Cruft cleanup to eliminate useless warnings 1997-02-02 21:33:37 +00:00
Joerg Wunsch
acf217b342 Make this texinfo file info-aware.
I notice info(1) has some problems moving back and forth through the
resulting info file, but emacs doesn't, so i figure it's rather a
problem with info(1) itself.  To the least, this file installs now
finally.
1997-02-01 11:25:49 +00:00
Mike Pritchard
21ac7f5f23 Don't use hardcoded *roff font change requests. 1997-01-31 01:06:39 +00:00
Mike Pritchard
6a145130de Don't use hardcoded *roff font change requests. Do it
via mdoc macros instead.
1997-01-31 01:00:12 +00:00
Mike Pritchard
c492ccdb9a Very minor mdoc cleanup. 1997-01-31 00:25:12 +00:00
Mike Pritchard
453196eb04 Update to reflect current include files. 1997-01-30 23:10:32 +00:00
Mike Pritchard
1ffa645077 Update to reflect current include files. 1997-01-30 23:01:49 +00:00
Mike Pritchard
a734cc76a8 Dont' mlink getgrent.3 to setgrfile.3, since there is no
setgrfile() function.
1997-01-30 22:52:50 +00:00
Mike Pritchard
f71a0a5ba8 Update to reflect current include files. 1997-01-30 22:39:40 +00:00
Mike Pritchard
d04f83f2e2 Update to reflect current include files. 1997-01-30 21:31:52 +00:00
Joshua Peck Macdonald
e10cf2fa74 Correct "Chflags() will fail it:" to read "Chflags() will fail if:". 1997-01-30 10:25:38 +00:00
David Nugent
2955fda458 Fix free()ing block twice, remove unused function. 1997-01-30 03:37:13 +00:00
David Nugent
f01e39893b Fix typo .->, for default separators in login_getcaplist(). 1997-01-29 06:50:00 +00:00
David Nugent
f9074e29fc Completed fixes with login_getcapsize(). 1997-01-29 06:31:42 +00:00
David Nugent
93aa55544d Added -Wall to CFLAGS, cleaned up (all avoidable) warnings. 1997-01-29 06:11:31 +00:00
David Nugent
51706563c4 1) Fixed bug in free()ing internal string/array where
allocated size not reset to 0 causing NULL dereference
	on call after login_close().
2)	Modify login_capsize() behaviour to match manpage, allow
	concatenated sizes; ie. 10m500k
1997-01-29 06:06:32 +00:00
David Nugent
0df75c02f4 #include <sys/stat.h> for umask() prototype. 1997-01-29 06:02:49 +00:00
Mike Pritchard
62ae6ac04d Update to reflect the current mount.h. 1997-01-29 05:43:46 +00:00
David E. O'Brien
21eab473b3 I was porting something from sysV world and found our cross references
not quite as good as I would expect.  So I'm introducing mknod to mkfifo,
and vice-versa.
1997-01-27 19:20:05 +00:00
Mike Pritchard
0469f5cd68 Document a couple of additional errno's.
Submitted by:	 Steinar Haug and Heiko W. Rupp
Obtained from: NetBSD-bugs & FreeBSD-current mailing lists
1997-01-26 03:44:55 +00:00
David E. O'Brien
e9ce3d82e4 Adds slice_type_name() which extends chunk_n[] for subtype's too.
Curorary review by:	phk
1997-01-23 06:29:01 +00:00
Jordan K. Hubbard
b5b673ff99 Only send QUIT if the last operation didn't time out (otherwise you're
just going to hang forever on the close).
1997-01-21 20:37:59 +00:00
Wolfram Schneider
75141cc987 Sort cross references. 1997-01-20 23:23:22 +00:00
Wolfram Schneider
1796040448 Sort cross references. 1997-01-20 23:10:39 +00:00
Jordan K. Hubbard
6164d13c71 Yow! Is my face red... I just noticed (duh) that signal() always installs
the handler with SA_RESTART set, so the system calls I wanted to have the
timeout effect will just restart instead (which is NOT what I wanted).
Sheepishly use sigaction() like a good boy and make timeouts actually do
something.

Also pass errors out more effectively so that fetch(1) actually understands
what went wrong.
1997-01-17 12:51:55 +00:00
Alexander Langer
8abdc2eb40 Sweep through the tree fixing mmap() usage:
- Use MAP_FAILED instead of the constant -1 to indicate
    failure (required by POSIX).
  - Removed flag arguments of '0' (required by POSIX).
  - Fixed code which expected an error return of 0.
  - Fixed code which thought any address with the high bit set
    was an error.
  - Check for failure where no checks were present.

Discussed with:	bde
1997-01-16 21:58:40 +00:00
Andrey A. Chernov
ea295661f9 Use collate for national [a-z]-like ranges
Should go in 2.2
1997-01-16 07:36:14 +00:00
Jordan K. Hubbard
efb7e53d32 The following patch to lib/libc/stdio implements positional arguments in
a manner consistent with other implementations.  Its done in a way that
adds only a tiny amount of overhead when positional arguments are not used.
I also have a test program to go with this, but don't know where it belongs
in the tree.

Submitted-By: Bill Fenner <fenner@FreeBSD.ORG>
1997-01-14 07:31:39 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Garrett Wollman
525a12e989 When attempting to load a `lastditch' timezone (e.g., because the load
of the user's timezone failed), don't bail if the specified timezone
doesn't have an offset; in this case it isn't going to.  (Perhaps it would
be better to change the caller to always supply one, but this is quick
and clean and fixes the bug in the easiest possible way.)

Should be in 2.2.  Fixes (properly) PR#1740.
1997-01-13 17:12:23 +00:00
Peter Wemm
7a19f2366e Bump libutil.so version (2.1 -> 2.2) since a whole heap of new functions
were added with the login class stuff.  This is needed since libutil.so.2.1
is what is used in RELENG_2_2 and well into the release cycle.  We only
bump once per release cycle as needed.
1997-01-13 03:05:04 +00:00
John Polstra
f08cd1247b Convert to mdoc format.
Add descriptions of RTLD_LAZY and RTLD_NOW.
Correct the synopsis to agree with the actual function prototypes.
Add clarifications of a few things.
Clean up the wording in a few places.
1997-01-12 19:55:49 +00:00
John Polstra
8a8c5a99ee Add definitions of RTLD_LAZY and RTLD_NOW. 1997-01-12 18:37:46 +00:00
Peter Wemm
a2e238f9aa Back out the last backout. This should work now that the bsd.info.mk
spammed revisions have been restored.
1997-01-12 07:10:57 +00:00
Peter Wemm
e227653767 Disconnect the doc subdir as well, bsd.info.mk freaks out if there
is no ${INFO} variable set.. :-(
1997-01-12 05:03:29 +00:00
Mike Pritchard
9880dddc9e Add missing RETURN VALUES/ERRORS sections. 1997-01-12 00:38:36 +00:00
Mike Pritchard
0604e65367 Rename the DIAGNOSTICS sections in several man pages
to RETURN VALUES like they should be.
1997-01-12 00:09:02 +00:00
John Polstra
65eabc3424 Set the "crt_ldso" member of the crt-to-ld.so interface structure. This
was apparently overlooked at the time the member was added.  Its absence
causes some error messages from the dynamic linker to begin with
"(null):" instead of with the pathname of the dynamic linker as they
should.

I am also adding a work-around to the dynamic linker, to cope with
legacy binaries that were built with older versions of crt0.
1997-01-11 23:59:34 +00:00
Mike Pritchard
8b3cccfc04 Remove the EINVAL error from the ERRORS sections that
say is means that a pathname had the high-order bit
set, since this is no longer an error.
1997-01-11 23:56:32 +00:00
Mike Pritchard
f111d9977f Minor mdoc fixes in msync.2 and munmap.2.
Add RETURN VALUES and ERRORS sections to mincore.

Closes PR# 1493.
1997-01-11 23:33:18 +00:00
Mike Pritchard
4a1ada815b Forgot a .El macro. 1997-01-11 23:26:44 +00:00
Mike Pritchard
5a547a7217 Add RETURN VALUES and ERRORS sections. 1997-01-11 23:20:29 +00:00
Mike Pritchard
bf67a4237e Some mdoc cleanup. Also added a RETURN VALUES and ERRORS
section.

Part of PR# 1493.
1997-01-11 22:51:27 +00:00
Mike Pritchard
25be21b630 Remove the comment about file names having to
be 7 bit clean, since it isn't true anymore.

Part of PR# 1493.
1997-01-11 22:31:47 +00:00
Mike Pritchard
9e5fade061 Bring stat(2) into line with what is now actually in
stat.h.  Also add a little blurb regarding st_mtime &
friends clarifiying how they are defined in a
non-_POSIX_SOURCE envorinment.  Closes PR# 1089.
1997-01-11 21:45:57 +00:00
Mike Pritchard
8c9c6676cf Add a couple of additional xrefs. 1997-01-11 19:57:27 +00:00
Joshua Peck Macdonald
81705f9116 This texinfo documentation isn't really enough texinfo-ized
to construct an info file from, as documented at the top.  There
are no nodes, so I'm commenting out the INFO= list.
1997-01-11 05:43:40 +00:00
Peter Wemm
f809a5f8dd Correct logic braino when attempting to exclude loopback addresses on
the first pass.

Submitted by: Greg Lehey <grog@lemis.de>
1997-01-09 16:38:05 +00:00
Peter Wemm
45eccbb217 Two minor changes to try and make it more robust in the face of many
interfaces, until it's redone to use sysctl().
- bump the SIOCGIFCONF buffer size from 1K to 8K
- if we didn't find a suitable address, return a failure.  Previously
  if it didn't find anything it left the return address uninitialised.
  Perhaps it would be better to return AF_INET/111/127.0.0.1 rather than
  failing?
1997-01-09 14:55:15 +00:00
Mike Pritchard
32e43d391c Minor mdoc style fixes. 1997-01-09 07:12:09 +00:00
John Polstra
1a809a51b0 The error returned when F_SETLK collides with an existing lock is
EAGAIN, not EACCES.  POSIX says that either one is OK.
2.2 candidate.
1997-01-08 23:48:02 +00:00
Garrett Wollman
e76da59456 Delete -D_POSIX_MODE and -D_MULTI_LIBM from CFLAGS. They never had any effect
because _IEEE_LIBM always takes priority, so the definition just served
to confuse.

Reviewed by:	bde
1997-01-08 13:22:28 +00:00
Andrey A. Chernov
07a7a2c487 Fix fake failures on the short names which looks like hexadecimal numbers
Submitted by: paul@vix.com
1997-01-08 13:06:14 +00:00
Joerg Wunsch
ca4967cbda Document the various reasons for EINVAL.
Document the flaw that `offset' is required to be page-aligned, in the
BUGS section.
1997-01-08 12:02:15 +00:00
Andrey A. Chernov
c4be7158c8 Build ebones/libtelnet only if MAKE_EBONES defined 1997-01-08 11:34:32 +00:00
Mike Pritchard
717feb32a0 Man page police. 1997-01-08 06:51:32 +00:00
David Nugent
1c594de59d Various bugfixes. 1997-01-07 16:28:12 +00:00
David Nugent
273b52cea1 Consistency check: refs to ~/.login.conf should be ~/.login_conf. 1997-01-07 14:29:50 +00:00
David Nugent
65fa0ae191 Commit the right version this time. :-) 1997-01-07 13:32:04 +00:00
David Nugent
2dc7d862d8 Fix for login_getclass(NULL) case. 1997-01-07 13:29:21 +00:00
Garrett Wollman
01754f1159 Fix Makefile so that dependencies are actually right this time.
It is almost always the wrong thing to put .y and .l files directly
into the SRCS.
1997-01-05 18:25:53 +00:00
Andrey A. Chernov
64cf8d66e2 Disable isxdigit block until proper solution will be found
isxdigit(name[0]) gives false failures on short names which looks
like hexadecimal digits, f.e. "fade", "babe", "d133", etc.
1997-01-05 17:26:09 +00:00
David Nugent
5023ac7251 Fix typos pointed out by bde (thanks!). 1997-01-05 09:06:32 +00:00
Bruce Evans
b488c451de Don't depend only <stdio.h> bogusly including <sys/types.h>.
(<sys/types.h> is a prerequisite for <login_cap.h> mainly because
the latter wants to typedef rlim_t.  rlim_t is typedefed in
<sys/types.h> in NetBSD.)
1997-01-05 07:12:29 +00:00
David Nugent
561d61ca90 Add missing manpage for login.conf. 1997-01-05 03:24:45 +00:00
David Nugent
68bbf3adb0 Library functions relating to the login class capabilities database,
including manpages.
See also login_cap.h.
1997-01-04 16:50:08 +00:00
Mike Pritchard
7eb461278e Fix the short description of kvm_getloadavg(3) to reflect
what the function really does.

Also fix a small mdoc problem I noticed while in there.

Obtained from: NetBSD-bugs (NetBSD PR#3077)
1997-01-02 20:16:20 +00:00
David Nugent
4ae89ecddd Added group= facility to /etc/ttys for tty grouping for more
more manageable and convenient referencing by login.conf (login
class database) and (e.g.) login.access.

This is the first of a group of commits which implements the login
class capabilities database.
1997-01-02 08:05:43 +00:00
Jordan K. Hubbard
b355f69744 Remove bogus weak reference. 1997-01-01 11:03:44 +00:00
Jordan K. Hubbard
799dbaaffc Eliminate unnecessary warning introduced by a missing forward declaration. 1997-01-01 10:06:37 +00:00
Bruce Evans
fd0a86436e Use ${COPY} instead of -C for installing non-source files. crt*.o
should be installed using the same flag as libraries, but ${COPY}
is currently used for libraries.
1997-01-01 04:52:55 +00:00
Alexander Langer
904259996b Grammatical changes.
Reviewed by:	joerg
1997-01-01 03:29:33 +00:00
Peter Wemm
a856779ff8 prototype of shared function now in include file 1996-12-31 09:16:12 +00:00
Peter Wemm
e85cee866d use svc_maxfd + 1 in the select() call.
(There may be a behavior difference between the 2.1 and 2.2/3.0 kernels
in this area, it seemed to work for me but I have a horribly hacked
select() that might have a bug in the handling of this)

Submitted by: wpaul
1996-12-31 09:13:59 +00:00
Peter Wemm
6678380e8e libgmp.so.2.0 was missing from the compat21 dist
(should be in 2.2)

Reported by:	John Fieber <jfieber@indiana.edu>
1996-12-31 09:02:39 +00:00
Bruce Evans
53f49427b0 Use beforeinstall' target instead of install' target to avoid setting a
bad example.
1996-12-31 02:39:40 +00:00
Bruce Evans
a1e71a0d14 Use beforeinstall' target instead of install' target so that the links
get installed.

The `install' target should only be overridden when the default one would
do something wrong and you're too lazy to fix the default one.
1996-12-31 02:38:28 +00:00
Mike Pritchard
cb22292338 Spelling/mdoc police. 1996-12-30 21:08:45 +00:00
Peter Wemm
c5bb6008ce Oops! Bad Idea! (TM)
Restore the clamp on the return value from rpc_dtablesize()..  Some programs
(eg: ypserv) use this as an indication of how large svc_fdset is in their
hand-rolled svc_run() loops.  The svc_fdset table is maintained by the
rpc library explicitly for compatability with such programs.  (It uses
a different variable-sized bitmap itself internally)
1996-12-30 18:41:20 +00:00
Peter Wemm
9180f99125 - make wire protocol 64 bit type safe
- extern prototypes now in include file
- fix local prototypes
- use standard functions

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 15:21:19 +00:00
Peter Wemm
9ff75e1aac - prototypes now in include file
- overhaul for unlimited fd's
- OpenBSD's ftp port bounce attack fix
- fix timeouts

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 15:19:08 +00:00
Peter Wemm
75a98e21b1 - canonical function declaration
- prototypes now in common include file
- use standard functions

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 15:16:22 +00:00
Peter Wemm
0143afc23b - overhaul for unlimited file descriptors
- prototypes now in include files

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.

Note: potential bug here, It looks like there could be a null pointer
dereference depending on what has already been called to initialise some
shared data.
1996-12-30 15:14:29 +00:00
Peter Wemm
3a6ebf3676 - make wire protocol 64 bit type safe
- use standard functions

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 15:10:14 +00:00
Peter Wemm
ae1e6afd31 - major overhaul to make this deal with unlimited fd's.
- kill non-FD_SETSIZE code

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.

Note, there was a nasty bug with our old code here.  It would trash the
stack if a fd > 31 was passed in.  It was using a "long" as though it
was an "fd_set", ie: it was assuming that a long was 256 bits wide. :-(
This has been lurking here for a while, since the FD_SETSIZE #ifdef's
were first implemented.
1996-12-30 15:07:33 +00:00
Peter Wemm
39f377845f - make wire protocol 64 bit type safe
Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 15:00:53 +00:00
Peter Wemm
c8df2bbd52 Remove our code that clamped the max select() fd number to FD_SETSIZE (256)
This function is now unused.
1996-12-30 14:59:12 +00:00
Peter Wemm
47c49966f6 - kill non-FD_SETSIZE code
Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:57:33 +00:00
Peter Wemm
ec3ca1a2d3 - 64 bit type safe on-the-wire protocol
- use standard functions
- prototype now in include file

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:55:38 +00:00
Peter Wemm
b93e2c954d - prototype now in include file, plus no longer needed anyway
- fix timeout code
- better sequence number generation (for long running daemons)
- dont close an unopen socket
- use standard functions
- 64 bit type safe for wire protocols
- unlimited file descriptors

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:53:20 +00:00
Peter Wemm
fadfbc36c6 - dont close an unopen socket
Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:49:24 +00:00
Peter Wemm
df7da8069f - Don't close an unopened socket
Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:48:28 +00:00
Peter Wemm
ec53c6fa4a - don't close unopen socket
- ensure we're not spoofed/confused while trying to talk to the portmapper
- handle new get_myaddress failure cases
- prototype now in include file

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:46:33 +00:00
Peter Wemm
726212fc09 - missing prototype from include file
- canconical function declaration (ctags safe)
- use standard functions

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:43:42 +00:00
Peter Wemm
e7485a4786 - OpenBSD's strncpy fixes to ensure NULL termination
- missed endrpcent() in some cases.

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:42:31 +00:00
Peter Wemm
5df070f36d - prototypes now in include file
- fix timeout code
- better "random" initial transaction id for long running daemons
- unlimited number of file descriptors to select().
- 64 bit type safe wire protocol
Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.

- typo (spelling police :-)
- dont die on select() that returns time remaining (on my systems)
1996-12-30 14:40:34 +00:00
Peter Wemm
7bdb2acfaa - prototypes now in standard include file
- improve initial "random" sequence number, to make it harder to guess
  in long running daemons.
- fix timeout code.
- unlimited number of fd's in select.
Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.

- Protect against select() that returns time remaining (on my systems).
1996-12-30 14:36:17 +00:00
Peter Wemm
d7c57d7159 - update return type of an "internal but documented" function
- warn about FD_SETSIZE in certain internal functions

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:30:27 +00:00
Peter Wemm
f3c1d59c73 - tags in correct order
- list missing functions
- list missing args

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:28:10 +00:00
Peter Wemm
ad51fb4d83 - canonical function declaration
- don't exit. It's bad form for libc to exit() or abort() instead of
  returning an error.
- only use loopback addresses after checking the real interfaces.

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:26:28 +00:00
Peter Wemm
0ab74c6fd6 - don't close an unopen socket
- canonical function declaration
- use constants from includes, not magic numbers
- use standard functions

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:23:50 +00:00
Peter Wemm
a68eb0d41f - prototype moved to include file
Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:21:36 +00:00
Peter Wemm
370c138add - buffer overflow fix, from OpenBSD
- optimise the error number -> string mapping code

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:19:34 +00:00
Peter Wemm
dd418becac - use standard function
- timeout code repaired elsewhere, remove unneeded workaround

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:17:20 +00:00
Peter Wemm
bf3bd46dc3 - prototype now in common include file
- standard function name

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:14:39 +00:00
Peter Wemm
27b979b2d7 - prototype now in include file, not here
Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:13:30 +00:00
Peter Wemm
dd50fc2139 - Man page fix, updates.
- minor cosmetic tweaks

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:12:36 +00:00
Peter Wemm
0159281b07 Add manpage links for rpc functions
Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:08:45 +00:00
Peter Wemm
1ad08a09e9 - Missing prototypes, including pointers to functions
- 64 bit long type safe (wire protocols specified in explicit sized types)
- Support systems that don't do unaligned accesses
- Support for explicit int16 and int32 sizes in xdr

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:07:11 +00:00
Peter Wemm
889f6ffb91 xdr manpage links
Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 14:02:42 +00:00
Peter Wemm
8c675e8051 Tempt fate! 'cvs add' a file remotely which also exists in the Attic on
RELENG_2_2!

This is part#2 of the previous commit to src/lib/libc/net to contain the
potential damage.

This provides stubs so that binaries linked in 2.2 will run on 3.0
1996-12-30 13:25:38 +00:00
Peter Wemm
ca785773f6 Here goes.. Bring the 4.9.5-P1 resolver into -current. This has the
DNSSEC stuff, among other things.  There are also some renamed functions,
I've left out the res_stubs.c from this commit in case cvs bombs out..
1996-12-30 13:18:48 +00:00
Jordan K. Hubbard
c94d336e8b LIBMODE -> LIBOWN 1996-12-30 07:32:34 +00:00
Jordan K. Hubbard
4accebfea4 Argh, guys, LIBOWN, not LIBMODE for -o! :-) 1996-12-30 07:31:43 +00:00
Peter Wemm
f6911bfce9 Back out max's rev 1.15. tclLoad.c and tclLoadDl2.c are most definately
needed, as he discovered when he tried to run vi. :-]
These files used to be stubs which used #ifdef PIC to decide whether to
use the real dlopen() version or the stub version from the src/contrib/tcl
sources.  Now, with the our stubs gone, the .PATH directive causes them to
be compiled directly from src/contrib/tcl/{unix,generic}.  You might need
to rebuild your depend rules though as they may have stale paths.

Also, this is a generated file. This should not have been edited here.
1996-12-30 06:20:21 +00:00
Masafumi Max NAKANE
4c180e3dfa Remove tclLoad.c and tclLoadDl2.c from SRCS as these files have been removed. 1996-12-30 01:11:26 +00:00
Joerg Wunsch
483f4c8371 Finally document the interfaces found in libutil. While being here,
also add the missing declaration of forkpty() to libutil.h.

Btw., the calling interface for login(3) is crude.  Some better
abstraction is needed, perhaps similar to logwtmp(3).

2.2 candidate, but i'll wait for the spelling police first. :)
1996-12-29 18:30:42 +00:00
Bill Paul
1e6c86d048 Unspam this file: replace spaces with tabs so make doesn't barf. (I smell
a cut & paste-o.)

Noticed by: Ron Bolin <rlb@mindspring.com>
1996-12-29 16:32:21 +00:00
Alexander Langer
c65976619e Sync with libc.
Submitted by:	John Birrell <jb@cimlogic.com.au>
1996-12-29 03:04:08 +00:00
Alexander Langer
d0c9b2a226 Added uthread_attr_destroy.c to SRCS.
Submitted by:	John Birrell <jb@cimlogic.com.au>
1996-12-29 02:51:55 +00:00
Alexander Langer
8596ee6d82 _thread_kern_sig_unblock takes an integer, not a reference.
Submitted by:	John Birrell <jb@cimlogic.com.au>
1996-12-29 02:38:50 +00:00
Peter Wemm
3488b209cc Fix some more problems:
- the .gz files are no longer used as intermediate files, it's in a pipe
  now.  (gunzip normally deleted them anyway, but this should not hurt)
- I accidently left a -p arg to install from testing.  Bruce says it should
  be ${COPY} instead, but almost everything else in the tree uses plain -c
  anyway.
- Use "LINKS=" or two identical files are installed sepeately instead of
  as links (doh!)
- Use "LIB..." instead of "BIN..." for install permissions.  Note that we
  still use bsd.prog.mk, not bsd.lib.mk because bsd.lib.mk has problems
  (it can't install a library unless it compiles it).
- Define LIBCOMPATDIR in Makefile.inc instead of using BINDIR.

Mostly submitted by: bde
1996-12-28 17:42:48 +00:00
Peter Wemm
a4ae35ba9e Remove these.. umm.. "interesting".. hacks now that they are not needed. 1996-12-28 17:15:10 +00:00
Peter Wemm
fbde87863d When linking with no rtld support, provide stub dl*() functions that
just return errors.  This removes the need for awful hacks like that in
our build of libtcl which would get link errors when linked static.

John Polstra once mentioned that this was on his "todo" list.

Note that one can use:
  cc -Wl,-Bstatic -o foo foo.o
and get an executable that has it's libraries statically linked, but has
a fully functional runtime linker so the executable can call dlopen() and
have it work.  (I've tested this)
1996-12-28 17:10:52 +00:00
Andrey A. Chernov
af155bdff3 Add comment that range checking is already done at upper level
Kill snprintf left in collate.c from previous backout

Should go in 2.2
1996-12-28 05:04:24 +00:00
Bill Paul
1d2493ff77 Small yet significant tweaks/cleanups:
- getpwent:
  o adjunctbuf should be NUL terminated after copying
  o _pw_breakout_yp() needs to know the length of the buffer returned
    from YP so it can properly NUL terminate its local buffer.

- getgrent:
  o YP buffers should be YPMAXRECORD + 2 bytes long and NUL terminated.
    (Previously they were hardcoded to 1024 bytes.)

- getnetgrent:
  o YP data should be copied with snprintf(), not sprintf()

These are 2.2 candidates. I will wait a few days to make sure these don't
break anything and then, if there are no objections, move them to the 2.2
branch.
1996-12-27 19:28:46 +00:00
Bill Paul
3951b8e32c Small yet significant tweaks/cleanups:
- getservent:
  o put _yp_check() proto under #ifdef YP where it belongs
  o local YP buffers should be YPMAXRECORD + 2 bytes long and should
    be NUL terminated after copying

- gethostbynis:
  o local YP buffer should be YPMAXRECORD + 2 bytes long

- getnetbynis:
  o local YP buffer should be YPMAXRECORD + 2 bytes long and should
    be NUL terminated after copying

- ether_addr:
  o local YP buffers should be YPMAXRECORD + 2 bytes long and should
    be NUL terminated after copying (in this case it's BUFSIZ + 2 bytes,
    but it happens that BUFSIZ == YPMAXRECORD.

- gethostbydns:
  o nuke stray 'return(NULL)' in __dns_getanswer() (harmless but looks silly)

These are 2.2 candidates. I will wait a few days to make sure these don't
break anything and then, if there are no objections, move them to the 2.2
branch.
1996-12-27 18:21:07 +00:00
Alexander Langer
205390f373 Make a note in the standards section that sysconf isn't completely
POSIX conforming.
1996-12-27 03:39:03 +00:00
Wolfram Schneider
ebddb6b4fe Use dynamic allocated buffers instead static buffers. No member or
line length limit anymore - now 500 members or 5000 members are
possible. For security group lines longer than 256K will be count as
an error. 256K should be enough for 65536 users.

Support comments (lines that begin with a #) if compiled with
option -DGROUP_IGNORE_COMMENTS.

Fortunately it seems that all system utilities which use getgrent()
functions are dynamically linked executables. So you need only
rebuild libc.so.3.0 if you want this change. Note: if you have
an old X server which depend on libc.so.2.* you should rebuild
libc.so.2.* too.

Not a 2.2 candidate.
1996-12-25 21:51:24 +00:00
Bill Paul
f360d1effe Another one-liner: remember to NUL terminate local copy of NIS host
lookup results. Without this, doing multiple host/addr lookups in a
single process yeilds strange results (the buffer is static, and
garbage may be left behind from previous lookups).

I just noticed this in 2.2-BETA. Unless somebody threatens to chop my
hands off with an axe, I'm going to move this to the 2.2-RELENG branch
shortly.
1996-12-24 17:01:49 +00:00
Bill Paul
6b73680dcf Make the __dns_getanswer() wrapper work right. For the newer versions
of BIND, we need to tweak some things to that gethostanswer() knows
whether or not we're dealing with an IPv4 or IPv6 address. (This'll
teach me to use a 2.1.0 system for NIS development -- but it's so nice
and stable I just can't being myself to upgrade it. :)
1996-12-24 02:10:24 +00:00
Wolfram Schneider
13608f6661 comma typos 1996-12-23 23:09:55 +00:00
Jordan K. Hubbard
9e08703418 BINMODE != BINOWN - I was wondering why the output files were owned by
uid 555. :-)
1996-12-23 21:47:28 +00:00
Peter Wemm
8ff1029282 In the spirit of Christmas, I give ye a gift!
- A major 11th hour, last second,  untested commit!

Build some infrastructure to clean up the compat lib distributions, and
also allow them to be installed from the source tree rather than having
to to and get the tarballs from freefall or a CD.  Some tweaks to
/etc/make.conf are in the pipeline to enable it.

This came about because it became apparent that we'd have to change the
compat21.tgz tarball to fix the NIS problem with 2.1.x binaries.  Since
it's tar..gz.uu, doing this would have caused a huge repository change
and we may as well try and fix it once and for all.  Now, adding/removing
libraries should have MUCH less repository impact.

Peril sensative sunglasses: on!
Flame proof suit: on!
Concept reviewed by a stream of ascii representing the opinion of: jkh
Changes casually reviewed by: jkh (but not actually tested)
1996-12-23 05:07:37 +00:00
Mike Pritchard
c5ea5a2eb0 Add the appropriate MLINKS for the new skey.3 man page. 1996-12-22 23:18:50 +00:00
Mike Pritchard
eabc732c93 Fix a spelling error. 1996-12-22 23:13:58 +00:00
Bill Paul
ce8bac1e6d Add __dns_getanswer() hook to allow access to the gethostanswer()
functions from outside libc. (Needed for async DNS resolver in ypserv.)
1996-12-22 22:05:43 +00:00
Joerg Wunsch
42ceaa809f Back out rev 1.5: the overflow condition is already handled elsewhere. 1996-12-22 15:48:06 +00:00
Stephen McKay
354ae80dd4 The fix for PR#bin/722 made it into 2.1.5 and 2.1.6, but not into -current.
Without it, the last row and last column don't get their background updated.

I think this should be in 2.2.

Submitted by:	Paul Koch <koch@thehub.com.au>   (again)

Passing observation: The fixes that pst put in on 1996/09/22 then backed out
look like they should be put in again.  If sysinstall is depending on bugs,
then it should be fixed.
1996-12-22 14:24:49 +00:00
David Nugent
85c08564c3 Manpage for public functions in libskey. 1996-12-22 13:33:56 +00:00
David Nugent
5b062f153c Incorporate new manpage for libskey. 1996-12-22 13:33:11 +00:00
Poul-Henning Kamp
76516938fa Just pick up the real thing from <sys/md5.h> 1996-12-22 10:32:17 +00:00
Poul-Henning Kamp
15cfc283d8 Make this compile in the kernel too, major cosmetic cleanup. 1996-12-22 10:27:25 +00:00
David Nugent
b8dd511777 Speeling fix. 1996-12-22 02:14:56 +00:00
Mike Pritchard
639460dc29 Convert to mdoc format. 1996-12-21 22:56:48 +00:00
Bill Paul
73418074a9 Add a missing #ifdef YP/#endif pair so that this module will
compile without -DYP.

Pointed out by: Wolfram Schneider
1996-12-21 18:36:44 +00:00
Bill Paul
cc64a2bf11 Fix for bug noticed by Christoph Kukulies.
_yp_dobind() checks to see if a fork() happens (by checking PIDs) and
invalidates all bindings if it finds itself in a newly created child
process. (This avoids sharing RPC client handles and socket descriptors
with the parent, which would be bad.) Unfortunately, it summarily
calls clnt_destroy() on the handles, which may result in the destruction
of a descriptor that isn't really a socket.

This is fixed by replacing the explicit call to clnt_destroy() with a
call to _yp_unbind(), which deals with potentially hosed socket descriptors
an a safe manner.

This is basically a one-liner. Once I confirm that it fixes Christoph's
problem, I'd like permission to put it in the 2.2-RELENG branch.
1996-12-20 19:41:15 +00:00
Bruce Evans
f4af388575 Removed references to nonexistent functions log2() and log2f(). 1996-12-18 17:47:03 +00:00
Steven Wallace
78ecc89829 Back out change. The last argument to semctl() IS union semun
for the C library call, which is a wrapper that passes it by reference
to the kernel.
1996-12-18 08:03:31 +00:00
Jordan K. Hubbard
6e173e27c2 Last argument to semctl() is union semun *, not union semun.
Pointed-Out-By: swallace
Person-With-Commit-Privs-By-Whom-It-Should-Have-Been-Committed: swallace
1996-12-17 21:58:00 +00:00
Jordan K. Hubbard
558ad0694d Sanitize and extend SIGALRM timeout handling. 1996-12-17 20:19:35 +00:00
Peter Wemm
ba27affb3a Regenerate. This picks up the new CFLAGS for the PR#2006 fix. 1996-12-17 13:13:11 +00:00
Joerg Wunsch
120e62ec50 Fix yet another buffer overflow. :-(
Vulnerable: all programs that use setlocale(LC_COLLATE),
setlocale(LC_CTYPE), or setlocale(LC_ALL).  The only setuid/setgid
binary i've found for this is w(1).

Should go into 2.2.
1996-12-16 17:32:58 +00:00
Peter Wemm
819ba1a1c4 Rerun configure for updates 1996-12-16 11:59:10 +00:00
Mike Pritchard
495be781d9 Mention FreeBSD explicitly along with 4.2BSD so that the
reader will know that this information does apply to FreeBSD also.

Closes PR# 1618.

This can go into 2.2.
1996-12-15 23:23:17 +00:00
Mike Pritchard
487990280d Correct some xrefs/mlinks. 1996-12-14 23:27:20 +00:00
Bruce Evans
c5dd403925 Fixed fiddling with the control word. Use the stack space reserved for
that purpose instead of space below the stack.
1996-12-14 16:43:53 +00:00
Bruce Evans
aa9a769760 Clean up the FPU stack before returning. One stack slot was leaked on
every call.  The damage was sometimes limited by other routines using
and freeing stack slots that should have been empty to being with.
1996-12-14 16:24:42 +00:00
Steve Price
fb5cb2083a Merge Lite2 mods, and -Wall cleaning. undelete(2) cruft
not yet implemented is protected by a define (BSD4_4_LITE)
that should be removed when this call is supported by the
kernel.
1996-12-14 06:03:29 +00:00
Joerg Wunsch
b784c223ee Fix the fix.
Pointed out by:	wollman, bde
1996-12-13 13:31:12 +00:00
Jordan K. Hubbard
0b3870cb60 Close PR#2198:
I've added an installation from optical disk drive facility.
	This enables FreeBSD to be installed from an optical disk, which
	may be formatted in "super floppy" style or sliced into MSDOS-FS
	and UFS partitions.

	Note:  ncr.c should be reviewed by Stefan Esser <se@freebsd.org>
	and cd.c by Joerg Wunsch <joerg@freebsd.org> before bringing this
	into 2.2.

Submitted-By: Shunsuke Akiyama <akiyama@kme.mei.co.jp>
1996-12-13 07:55:14 +00:00
Joerg Wunsch
4e17605909 Don't free the line buffer, since getttynam(3) might still reference
it.

Closes PR # bin/2196: Bug in src/libc/gen/gettty...

Submitted by:	davidn@blaze.net.au (David Nugent)
1996-12-12 23:52:34 +00:00
Joerg Wunsch
4d224b7f55 Fix an embarassing and rather obscure incarnation of an uninitialized
local variable use.

Found by:	actually using ascii2addr() :-/
1996-12-12 21:21:11 +00:00
Alexander Langer
6616431596 POSIX.4 defines MAP_FAILED to be the error return from mmap(). 1996-12-12 01:00:14 +00:00
Poul-Henning Kamp
d4c468e3fe Don't look for encumbered objects, but encumbered sources. 1996-12-11 10:02:29 +00:00
Garrett Wollman
13629194a5 Get struct ether_addr directly from <net/ethernet.h> rather than pulling
in lots of unrelated junk from <net/if.h> and <net/if_ether.h>.  These
functions still aren't prototyped anywhere (but should be in
<net/ethernet.h>---got that, Bill?).
1996-12-10 17:19:11 +00:00
Mike Pritchard
222ca58f9a Change another reference to host names to domain names, and restore some
changes that were lost.

Pointed out by: bde
1996-12-09 16:50:39 +00:00
Mike Smith
b0236c093d English pedantry : affect -> effect
Submitted by:	 Daniel O'Callaghan" <danny@panda.hilink.com.au>
1996-12-09 06:04:03 +00:00
Andrey A. Chernov
fca321513e Turn POSIX_SAVED_IDS off 1996-12-06 22:53:52 +00:00
Jordan K. Hubbard
380577b434 I asked Bill Paul why _getnetbynis() was only being called with 2 parameters,
and he said:

	The 3rd agrument is new; looks like it was part of the upgrade to
	a new BIND with some IPv6 support. The third argument here should be
	AF_INET. In order for it to be anything else, I'd have to add new
	NIS functions to support IPv6 lookups. I don't even know what those
	look like yet.

So there ya go, add AF_INET as the 3rd argument to the call.

Submitted-by: wpaul
1996-12-06 00:12:31 +00:00
Jordan K. Hubbard
2696fe9c84 Remove more instances of passing arrays by address when they should
have simply been passed as arrays.  In some cases, casts had even
been added to remove the warnings generated by such misuse!  Aieee!
1996-12-05 18:46:19 +00:00
Jordan K. Hubbard
afb5b8ed4d Eliminate 3 more examples of gratutiously passing arrays by address.
Everyone please call ParaSoft today and say "I will buy 57 copies of
Insure++ tomorrow, but first I want a FreeBSD version." :-)
1996-12-05 18:41:35 +00:00
Jordan K. Hubbard
ecc9c8e3cd sethostname() returns int, not long. I could get used to having this
copy of insure++, too bad the runtime only works for BSD/OS. :-(

Maybe they'll be so impressed by my initial 15 entry bug report for it
that they'll take the FreeBSD version more seriously. :-) :-)
1996-12-05 18:27:20 +00:00
Jordan K. Hubbard
4186474051 _key is a char array and we don't need to pass its address to _buildkey()
when buildkey is expecting a char *.
1996-12-05 18:22:00 +00:00
Jordan K. Hubbard
8af0a47fba gethostname() returns int, not long. Answered my own question by
RTFM'ing.  Either both the header files and the man pages are wrong
or this code is, and I'll take the majority decision. :-)
1996-12-05 18:14:56 +00:00
Jordan K. Hubbard
15ba0c4e86 make u_char * -> char * conversion explicit.
Found-By:  insight's "insure++" tool.
1996-12-05 18:05:11 +00:00
Mike Pritchard
96bafa0758 The semget man page uses the incorect symbol for alter
access.  Closes PR# 1712.

Submitted by:	Kent Vander Velden
1996-12-03 23:03:22 +00:00
Bill Paul
2be5d4cba8 Add support for detecting and hopefully using the passwd.adjunct.byname
NIS map which is present on SunOS NIS servers with the SunOS C2 security
hack^Woption installed. I'm convinced that the C2 security option restricts
access to the passwd.adjunct.byname map in the same way that I restrict
access to the master.passwd.{byname,buid} maps (checking for reserved ports),
which means that we should be able to handle passwd.adjunct.byname map
correctly.

If _havemaster() doesn't find a master.passwd.byname map, it will now
test for a passwd.adjunct.byname map before defaulting back to the
standard non-shadowed passwd.{byname,byuid} maps. If _pw_breakout_yp()
sees that the adjunct map was found and the password from the standard
maps starts with ##, it will try to grab the correct password field
from the adjunct map. As with the master.passwd maps, this only happens
if the caller is root, so the shadowing feature is preserved; non-root
users just get back ##username as the encrypted password.

Note that all we do is grab the second field from the passwd.adjunct.byname
entry, which is designated to be the real encrypted password. There are
other auditing fields in the entry but they aren't of much use to us.

Also switched back to using yp_order() to probe for the maps (instead
of yp_first()). The original problem with yp_order() was that it barfed
with NIS+ servers in YP compat mode since they don't support the
YPPROC_ORDER procedure. This condition is handled a bit more gracefully
in yplib now: we can detect the error and just punt on the probing.
1996-12-03 17:55:49 +00:00
Wolfram Schneider
fd3bf33fd0 upgrade STANDARDS from POSIX 1003.1-88 to 1003.1-90 using .St macro
use ``is expected to conform to'' phrase, not ``conforms to''

Pointed out by: Bruce->NIST-PCTS
1996-12-02 20:03:58 +00:00
Mike Pritchard
c5fe2345a9 Update getdomainname(3) to reflect that it operates on
domain names and not host names.

Pointed out by:  bde
Obtained from:  NetBSD
1996-12-01 00:10:28 +00:00
Poul-Henning Kamp
00f723bf6b Improve the Dangerously Dedidcated mode a bit. Not much, but a bit better. 1996-11-27 22:44:43 +00:00
Andrey A. Chernov
e2900279d2 Add rcsid[]
Since locale reading code not resistent against stack overflowing or
similar intruder attacks, don't allow PATH_LOCALE env variable action
for s-bit programs (non-standard locale path setting)
1996-11-27 22:30:44 +00:00
Andrey A. Chernov
40c0625e97 Add Id
Optimize/improve recently added locale restoration on failure
1996-11-26 08:00:17 +00:00
Andrey A. Chernov
1a1379aedf Move PATH_LOCALE handling to setlocale.c, simplify locale path building,
don't treat empty encoding as C encoding
1996-11-26 02:52:52 +00:00
Andrey A. Chernov
c8f931a80e PATH_LOCALE: use this non-standard env variable first time only, i.e.
strdup() it to prevent unsetenv() or setenv() effects. Check its length to
not allow user to overflow internal locale buffer. Move PATH_LOCALE
handling code into one place.

POSIX: make better stub for LC_MONETARY & LC_NUMERIC, now it check
locale directory existance instead of refusing all non-C non-POSIX
locales. POSIX treats empty locale env variable as unset variable
while our old code treats it as "C" locale, fix it. Implement previous locale
restoring, if locale setting fails. Old code assumes success if some
of LC_ALL subset is successed even other fails, POSIX treats it as
failure with previous locale restoring, fix it.

Remove unneccessary length checking in currentlocale()
1996-11-26 02:49:53 +00:00
Paul Traina
f308a4b42c get_myaddress() wasn't following the interface array properly
Cannidate for: 2.2
1996-11-22 23:37:08 +00:00
Garrett Wollman
3267ea91c8 Oops, we still want to build/install the static libraries. 1996-11-20 20:55:11 +00:00
Garrett Wollman
bbcb8093fe Copy a slightly modified version of the `libgnumalloc hack' to allow
us to finally phase out the 8K shared version of liby in favor of the
600-byte static one, as was done years ago for libl/libfl.
1996-11-20 20:54:28 +00:00
Bruce Evans
766631018f Fixed execvp() of an empty pathname to fail POSIXly. Previously it
attempted to exec the components of $PATH and it usually set errno
to the wrong value.

Found by:	NIST PCTS
1996-11-18 19:24:47 +00:00
Bruce Evans
1ad652a54c Fixed uninitialized variables for the '/'-in-pathname case in execvp().
Garbage in `eacces' caused the wrong errno to be set for non-EACCES errors.
Garbage in `etxtbsy' caused a semi-random retry strategy for ETXTBSY errors.

Found by:	NIST-PCTS.  gcc -Wall reported the problem, but -Wall is not
		enabled for libc.
1996-11-18 16:56:51 +00:00
Andrey A. Chernov
dbf96d1210 Oops, back out previous optimization, don't work as I expect
(lack of sleep)
1996-11-14 09:51:47 +00:00
Andrey A. Chernov
bbd3d24b96 Since ftpPutURL not use hostname cache, optimize it by always closing
connection at the end of operation, so it not leave opened
file without a reason.
1996-11-14 09:44:09 +00:00
Andrey A. Chernov
0c663b7771 For functions ftpGetURL, ftpPutURL, ftpLogin it was impossible to know
FTP error return code because
1) They return NULL, it means that ftpErrno can't be used because
it takes file pointer
2) They don't have FILE-type argument as f.e. ftpGet/ftpPut to use
it for ftpErrno instead.

For that functions I add yet one int* type argument to store
FTP error return code. It is impossible to add some global variable
for that reason, because user can have multiply FTP connections
opened at the same time.

So, interface changed, major number bumped.
Userland changes will follows.

Minor bugfixes, the code:
Forget to close file in few places, when failure occurse
Forget to NULL cached host name, multiply free is possible
1996-11-14 06:59:41 +00:00
Andrey A. Chernov
9e05df0992 Oops, forget the fact that several ftp connections can be active
at the same time, so add new con_state to avoid QUIT recursion

Still should go to 2.2
1996-11-14 05:22:12 +00:00
Andrey A. Chernov
b92fd90719 1) Don't allow endless recursion in ftp_close when it attempts to
send QUIT to closed connection.
2) Preserve login failure code, don't overwrite it with ftp_close
code

Should go to 2.2
1996-11-14 05:05:26 +00:00
Alexander Langer
1e7c9b04ad Slight rewording of the BUGS section. 1996-11-13 23:55:28 +00:00
Jeffrey Hsu
c1f20410c2 Parameters for localtime_r() and gmtime_r() definitions changed.
Parameters for pthread_getspecific() call changed.
pthread_keycreate() renamed to pthread_key_create().
1996-11-11 09:14:24 +00:00
Jeffrey Hsu
3384e369af Parameters pthread_getspecific() changed. 1996-11-11 09:11:59 +00:00
Jeffrey Hsu
9144f05e36 Add pthread_mutexattr_init() and pthread_mutexattr_setkind_np(). 1996-11-11 09:09:30 +00:00
Jeffrey Hsu
d8fadc0e80 Add uthread_attr_init.c, uthread_attr_setstacksize.c, uthread_mattr_init.c,
uthread_mattr_kind_np.c, uthread_multi_np.c, and uthread_single_np.c.
1996-11-11 09:08:11 +00:00
Jeffrey Hsu
509de77c10 Moved enum pthread_mutextype to pthread.h.
Add pthread_mutexattr_default definition.
1996-11-11 09:07:05 +00:00
Jeffrey Hsu
f258836a24 Make pthread_getspecific() compliant with the final IEEE pthreads
specification:  return parameter passing changed.
1996-11-11 09:05:29 +00:00
Andrey A. Chernov
d7b100f932 kvm_malloc:
When malloc fails. don't try to memset NULL pointer, it cause core dump
Replace malloc+memset with calloc, theoretically it can do some
optimization of zeroing process internally
Improve error diagnostic
1996-11-11 08:28:47 +00:00
Joerg Wunsch
94fbd76c28 Merge from the 2.2 branch: describe MNT_FORCE for mount(2). 1996-11-10 09:28:20 +00:00
David E. O'Brien
747b64b167 Added to MNT_FORCE option description after seeing Bruce's commit message
dealing w/the fixit floppy.
Also added the MNT_RELOAD, MNT_WANTRDWR, MNT_ASYNC, MNT_NOATIME,
MOUNT_UNION flags.  Someone might want to check my description of MNT_RELOAD.

2.2-R candidate.  Not a 2.1.6-R candidate -- some current flags aren't in
2.1.5-R's version.
1996-11-10 05:56:43 +00:00
Bill Paul
9fa75c1550 - Avoid possible SEGVs: never call clnt_destroy() without checking
for NULL RPC client handles. This should hopefully fix the problems
  Satoshi reported on -current.

- Add socket descriptor sanity checks to _yp_unbind().

- Fix yp_order() so that it handles the RPC_PROCUNAVAIL error gracefully.
  NIS+ in YP compat mode doesn't support the YPPROC_ORDER procedure.

This is a 2.2 candidate with bells on.
1996-11-08 01:42:02 +00:00
Bruce Evans
b1f6a5fb5d Document that the `old' count is returned for the ENOMEM case. 1996-11-04 17:03:34 +00:00
Mark Murray
58dee85f34 Compile libtelnet from eBones, not secure.
2.2 candidate.
1996-11-03 16:59:04 +00:00
Peter Wemm
c293d821b3 Doc updates and cleanups made with the bind-4.9.4 update some time ago.
I thought I had committed these, but it seems not.
1996-11-01 06:29:00 +00:00
Peter Wemm
df9c30afec Add an "officially undocumented" tweak for squid so that it can see the
TTL of DNS records that it looks up for it's resolver cache.

Obtained from: Endre Balint Nagy <bne@CareNet.hu>, via squid-1.1.x source.
1996-11-01 06:25:43 +00:00
John Dyson
c8318ed6c3 Correct a "spelling" error in a comment. 1996-10-31 17:50:45 +00:00