Commit Graph

1153 Commits

Author SHA1 Message Date
James Raynard 1638d6b6d5 Oops, replace a rather important line that was lost in transit 8-( 1996-06-08 15:28:11 +00:00
Alexander Langer 79020cf23f Document that truncate can also be used to extend the size of a file,
but doing so is not truly portable.
1996-06-07 01:34:47 +00:00
Poul-Henning Kamp 44ffb5f593 Pass correct length OID to kernel for KERN_PROC_ALL. 1996-06-06 17:16:52 +00:00
Bill Paul c8bb0df5d3 Add ypxfrd.x so that the XDR routines for this protocol will be built
into librpcsvc.
1996-06-05 03:54:43 +00:00
James Raynard b487e9d356 Submitted by: (based on code in "Advanced Programming in the Unix Environment"
by W.Richard Ste vens. EINTR handling suggested by bde@freebsd.org).

Code cleanup:

1. Add missing return type.
2. Replace 'union wait' by int.
3. Use Posix-style signal handling instead of signal().
4. Use fork() instead of deprecated vfork().
5. Block signals before fork()'ing, instead of after.
6. Return -1 if fork() fails, instead of 0.
7. Add EINTR handling for waitpid() call.

Also add claim of Posix conformance to man page.
1996-06-05 00:08:54 +00:00
James Raynard ccbcef60f5 Code clean up:
Changed type of pid from int to pid_t. (Missed one!)
1996-06-04 17:35:15 +00:00
James Raynard e75ad74a88 Code clean up:
Changed type of pid from int to pid_t.
1996-06-03 13:19:10 +00:00
James Raynard 0eb3435311 Code clean up:
Added missing headers for system functions.
1996-06-03 13:16:53 +00:00
Joerg Wunsch d6c9f122c8 Minor corrections. The second parameter is actually of type int
(though only char will be used), and our implementation is not really
worse than the SysV one, so there's no need to claim so in the BUGS
section.
1996-06-03 10:40:39 +00:00
Poul-Henning Kamp 6b5139742c backout yacc changes 1996-06-02 17:10:13 +00:00
Poul-Henning Kamp 15e85e0293 backup yacc changes 1996-06-02 17:08:32 +00:00
Bruce Evans f05bebb3ad Clean up the FP stack before returning. The i387 exp() leaked an FP
register on its first call.  Subsequent calls reused the register so
the leak didn't accumulate.  Fixes PR 1275.
1996-06-01 18:00:07 +00:00
Bill Paul a230877213 Make _yp_dobind() a litle smarter:
Now that we preserve RPC handles instead of rebuilding them each time
a ypcln function is called, we have to be careful about keeping our sockets
in a sane state. It's possible that the caller may call a ypclnt
function, and then decide to close all its file descriptors. This would
also close the socket descriptor held by the yplib code. Worse, it
could re-open the same descriptor number for its own use. If it then calls
another ypclnt function, the subsequent RPC will fail because the socket
will either be gone or replaced with Something Completely Different. The
yplib code will recover by rebinding, but it doing so it may wreck the
descriptor which now belongs to the caller.

To fix this, _yp_dobind() needs to label the descriptor somehow so
that it can test it later to make sure it hasn't been altered between
ypclnt calls. It does this by binding the socket, thus associating a port
number with it. It then saves this port number in the dom_local_port member
of the dom_binding structure for the given domain. When _yp_dobind() is
called again (which it is at the start of each ypclnt function), it checks
to see if the domain is already bound, and if it is, it does a getsockname()
on the socket and compares the port number to the one it saved. If the
getsockname() fails, or the port number doesn't match, it abandons the
socket and sets up a new client handle.

This still incurs some syscall overhead, which is what I was trying to
avoid, but it's still not as bad as before.
1996-06-01 05:08:31 +00:00
Bill Paul 217ae63218 Improve NIS performace of getservbyname() and getservbyport(). Both these
functions are implimented as wrappers around getservent(), which means it's
up to getservent() to do all the work. The NIS support in getservent()
only allows it to scan through the services.byname map one entry at a
time until it finds the requested service name/port. This can be painfully
slow due to the overhead involved (lots and lots of successive RPCs).

To fix this, we allow getservbyname() and getservbyport() to signal
getservent() that if NIS is turned on (there's a '+' in /etc/services),
the usual yp_first()/yp_next() linear search should be abandoned and
yp_match() used instead. This causes getservent() to immediately
locate the requested entry instead of wasting time groping through the
whole map.

The downside is that this trick is accomplished by exporting a couple of
pointers from getservent.c which getservbyname.c and getservbyport.c can
preset in order to tell getservent() what to do. If all three functions
were in the same source module, then the extra cruft could be delcared
static to avoid poluting the global symbol space. Maybe they should be
combined anyway. For now I've settled on prepending lots of underscores.
1996-06-01 04:40:42 +00:00
Peter Wemm 3ccd4a12e8 Use the setsockopt for IP_PORTRANGE to cause rresvport() to allocate a
privileged port within a single bind(), rather than looping through
attempts to bind over and over again over progressively lower ports.

This should speed up rlogin/rsh etc, and will probably cure some of the
strange rlogin hangs that have been reported in the past where rresvport()
managed to bind() to a port address that it shouldn't have.
1996-05-31 04:00:21 +00:00
Poul-Henning Kamp dd2ff46a12 yacc rule change. 1996-05-30 23:01:04 +00:00
Poul-Henning Kamp 96b2fceaff yacc rule change. 1996-05-30 22:54:10 +00:00
Jordan K. Hubbard 941fbd30eb Fix bogus MLINKS line from vasprintf change. 1996-05-29 05:00:12 +00:00
Wolfram Schneider 01fc74a034 add manpage links
asprintf.3 -> printf.3
vasprintf -> printf.3
1996-05-29 01:00:00 +00:00
Wolfram Schneider 17753d1780 add manpage links:
des_setkey.3 -> crypt.3
des_cipher.3 -> crypt.3
err_set_exit.3 -> err.3
err_set_file.3 -> err.3
strunvis.3 -> unvis.3
1996-05-29 00:57:19 +00:00
John Polstra 228a10153e Correct two errors in the manual page. 1996-05-28 18:57:31 +00:00
Poul-Henning Kamp 8e3fab403b Use ld -O insted of ld -o + mv. 1996-05-28 16:24:53 +00:00
Wolfram Schneider dd6e5b0fa9 remove MLINKS tparm.3 due name clash with libtermcap 1996-05-27 22:58:29 +00:00
Wolfram Schneider d209ee0170 remove MLINKS regcomp.3 regexec.3 regerror.3 due name clash with libc 1996-05-27 22:52:24 +00:00
Peter Wemm 15aa00d597 Add an implementation of the gnu-ish asprintf() and vasprintf(). They are
not based on gpl'ed code, just prototype and usage.  I'm not 100% certain
they behave the same while the system is in trouble (eg: malloc() failing)
but in those circumstances all bets would be off anyway.

These routines work like sprintf() and vsprintf(), except that instead of
using a fixed buffer, they allocate memory and return it to the user
and it's the user's responsibility to free() it.  They have allocate as
much memory as they need (and can get), so the size of strings it can deal
with is limited only by the amount of memory it can malloc() on your
behalf.

There are a few gpl'ed programs starting to use this interface, and it's
becoming more common with the scares about security risks with sprintf().
I dont like the look of the code that the various programs (including
cvs, gdb, libg++, etc) provide if configure can't find it on the system.

It should be possible to modify the stdio core code to provide this
interface more efficiently, I was more worried about having something
that worked and was secure.  :-)  (I noticed that there was once intended
to be a smprintf() routine when our stdio was written for 4.4BSD, but it
looks pretty stillborn, and it's intended interface is not clear).  Since
Linux and gnu libc have this interface, it seemed silly to bring yet
another one onto the scene.
1996-05-27 10:49:43 +00:00
Marc G. Fournier 6859875c81 Removed false copyrights... 1996-05-27 06:54:03 +00:00
Marc G. Fournier b0d57629f6 Added in appropriate Berkeley copyright and RCS Id: string
Closes PR#doc/536
1996-05-27 04:10:28 +00:00
Peter Wemm b8953cdb9f Document that the superuser cannot override link() and unlink() on
directories, and mention that it was historical practice.
1996-05-24 16:32:11 +00:00
Mike Pritchard 712dc76e87 Fixed various problems: typos, grammer, missing include files
wrong function type declarations, and wrong argument type
declarations.
1996-05-23 01:05:25 +00:00
Bill Paul dfe8e51c4d - Fix _listmatch() to close PR #1207.
Fix submitted by: Alan Cox <alc@cs.rice.edu>

- Nuke yet another free(result) that isn't needed. (This one I found
  without phkmalloc's help. :)
1996-05-21 16:11:27 +00:00
Garrett Wollman 6335830372 Fix for vfsload(3):
- Don't allow non-root users to specify LKMDIR.
- Don't allow any users to specify TMPDIR.
- Call /sbin/modload using execl() rather than execlp().
1996-05-17 15:35:13 +00:00
Bill Paul 2694f9b9a8 - Patch around amd core dump problem: don't allow yp_unbind() or _yp_unbind()
to call clnt_destroy() on a potentially NULL RPC handle. Somebody should
  bang on this a bit to make sure the problem is really gone; I seem to
  have difficulty reproducing it. Patch provided by Peter Wemm and
  slightly tweaked by me.

- Don't call _yp_unbind() in individual ypclnt functions unless we encounter
  an RPC error while making a clnt_call().
1996-05-16 18:01:17 +00:00
John Polstra cbdc4399d2 Fix a bug caused by the collision of a local assembler label with another
use of the same label in a recently-introduced PIC_PROLOGUE.  This
should solve the recent core dumps from pdksh.
1996-05-11 13:28:11 +00:00
Peter Wemm 7f11212ef1 Fix a bogon in the pic + threadsafe version of cerror, it was missing
a PIC_EPILOGUE (leaving an extra long on the stack).

Submitted by: John Polstra <jdp@polstra.com>
1996-05-10 16:43:47 +00:00
John Polstra 08f4fc1aa8 Clarify the description of the FNM_PERIOD flag. 1996-05-10 00:28:34 +00:00
Poul-Henning Kamp 31d4757546 Make rules reentrant. 1996-05-09 11:30:51 +00:00
Wolfram Schneider 9fb933075e ``mv'' -> ``mv -f''
``rm'' -> ``rm -f''
so mv/rm may not ask for confirmation if you are not root
1996-05-07 23:19:49 +00:00
Bill Paul 03cee47d84 Grrrr... yet another variation on Murphy's Law: the best way to find
bugs in your code is to put it in the -stable branch. (Corollary: the
day you discover the bug is the day the Internet decides to route your
telnet session to the repository box via Zimbabwe.)

Remove one bogus free(result) (from _havemaster()) that slipped by me.

Flagged by: phkmalloc
Pointed out to me by: Stefan Esser
1996-05-07 20:51:52 +00:00
Peter Wemm 5437a8234c Sync libc_r with libc changes.. 1996-05-05 08:22:20 +00:00
Peter Wemm f1703dfbaa Add support to enable libc to be compiled in ELF format. (#ifdef __ELF__)
In a nutshell, this macroizes the local/global symbol scoping rules
that are different in a.out and ELF.  It also makes the i386 assembler
stubs conform to i386 PIC calling conventions - the a.out ld.so didn't
object, but the ELF one needs it as it implements PIC jumps via PLT's as
well as calls.  The a.out rtld only worked because it was accidently
snooping the grandparent calling function's return address off the stack..

This also affects the libc_r code a little, because of cpp macro nesting.
1996-05-05 07:56:21 +00:00
Bill Paul a169c9b1f9 NIS client-side performance tweak:
Each of the ypclnt functions does a _yp_dobind() when it starts and then
a _yp_unbind() when it finishes. This is not strictly necessary and it
wastes cycles: it means we do a new clnt_create() and clnt_destroy()
for each yp_whatever() call. In fact, you can do multiple clnt_call()s
using a single RPC client handle returned by clnt_create(). Ideally we only
have to create a handle to ypserv once (the first time we call a ypclnt
function) and then destroy it and rebind only if a call to ypserv fails.

- Modify _yp_dobind() so that it only creates a new RPC client handle
  when establishing a new binding or when one of the ypclnt calls
  invalidates an existing binding and calls _yp_dobind() to establish
  a new one.

- Modify the various ypclnt functions to only call _yp_unbind() if a
  call to ypserv fails.
1996-05-02 15:44:53 +00:00
Poul-Henning Kamp 2572133ed3 NBPG -> PAGE_SIZE 1996-05-02 09:23:36 +00:00
Poul-Henning Kamp 0e51b8b85d Use PAGE_SIZE instead of NBPG 1996-05-02 08:43:37 +00:00
Poul-Henning Kamp d71458ee72 Cache the result of getpagesize() so we only make one syscall.
Use getpagesize instead of CLBYTES.
1996-05-02 08:43:05 +00:00
Mike Pritchard a251b9e77e Convert the time2posix man page to mdoc format. This still
needs some other cleanup, but it is good enough for now.
1996-05-01 23:17:27 +00:00
Mike Pritchard 417349c472 Fix a typo. 1996-05-01 22:49:36 +00:00
Mike Pritchard eea782bac2 Remove a redundant description of the EMFILE error, and fix a typo.
Submitted by:	James Raynard <jraynard@dial.pipex.com>
1996-05-01 22:20:40 +00:00
Bruce Evans 50e9e20943 Fixed incomplete or wrong lists of prerequisite #includes related to
<sys/types.h>.
1996-05-01 01:45:23 +00:00
Bruce Evans 9c6e4f2a7c Fixed incomplete or wrong lists of prerequisite #includes related to
<sys/types.h>.
1996-05-01 01:40:04 +00:00
Bruce Evans 3a880d5ded Fixed a wrong prerequisite #include and a missing function-arg type. 1996-05-01 01:18:43 +00:00
Bruce Evans 6c0be88a57 Fixed misformatted #include (.Ft -> .Fd). 1996-05-01 01:04:44 +00:00
Bruce Evans cdd84b0211 Fixed longstanding namespace convolution involving rune_t vs wchar_t.
If _ANSI_SOURCE or _POSIX_SOURCE is defined, then <ctype.h> had to
be included before <stddef.h> or <stdlib.h> to get rune_t declared.
Now rune_t is declared perfectly bogusly in all cases when <ctype.h>
is included.

This change breaks similar (but more convoluted) convolutions in the
stddef.h in gcc distributions.  Ports of gcc should avoid using the
gcc headers.
1996-05-01 00:40:10 +00:00
Jordan K. Hubbard afc1e28e76 hash_search() has changed its calling semantics somewhat - bring
libforms back into sync.
1996-04-30 00:17:56 +00:00
Bill Paul 88ce2dd1ef Very minor tweak:
In __initdb(), a failure to open the local password database is supposed
to result in a warning message being syslog()ed. This warning is only
supposed to be generated as long as the 'warned' flag hasn't been yet;
once the warning is generated, the flag should be set so that the message
is only syslog()ed once. However, while the state of the flag is checked
properly, the flag's state is never changed, so you always get multiple
warnings instead of just one.

Pointed out by: Peter Wemm
1996-04-29 14:48:47 +00:00
Jordan K. Hubbard 4f3fd9ad3f Fix mis-declared static arrays that made sysinstall SEGV in
Set_Boot_Blocks().  Boy, this one had me tearing my hair out!
I hate how the loader distinguishes between `extern char *foo' and
`extern char foo[]' sometimes! :-)
1996-04-29 06:45:33 +00:00
Jordan K. Hubbard d402093152 Move some warn()'s into DEBUG space since I don't need them coming
out in my curses interfaces and spamming my screen.
1996-04-29 05:03:02 +00:00
Joerg Wunsch 711e38f8ed /etc/skeykeys was basically suffering from the same vulnerability
as any non-shadowed /etc/passwd.  Ironically, all programs using S/Key
have already been setuid root except keyinfo(1).

This modification creates /etc/skeykeys with mode 0600 to prevent it
from being examined by ordinary users.
1996-04-26 21:33:18 +00:00
Jordan K. Hubbard fdd92ff346 The traceon and traceoff directives aren't in this version ncurses.
Guess nobody's built these tests for quite awhile!
1996-04-25 01:18:30 +00:00
Bruce Evans e0150c8ff7 Removed bogus includes of <sys/types.h> from synopses.
This commit covers the man pages for most of the ANSI library functions.
A few others such as strtol.3 have to mention <sys/types.h> because they
mix ANSI interfaces with less well designed extensions.
1996-04-19 19:00:26 +00:00
Bruce Evans 8a4599117b Don't include <sys/types.h> when it isn't used.
This commit covers most of the ANSI library functions. Many others only
need <sys/types.h> because they use u_xxx.
1996-04-19 18:40:25 +00:00
Bruce Evans 6da47fa518 Added `const' to types of sys_siglist and sys_signame. 1996-04-19 14:07:44 +00:00
Bruce Evans 6a59f3db1a Added `const' to types of sys_errlist and sys_nerr.
Use .Va instead of .Fa to describe these variables.

Say a little about inconsistent declarations of sys_errlist in the BUGS
section.
1996-04-19 14:02:03 +00:00
Sujal Patel ea8c29e94b Fix the man page to reflect the recent addition of RFNOWAIT and the removal of
Plan9 specific flags.
1996-04-18 23:36:41 +00:00
Andrey A. Chernov c0ea8ed12f Fix error in wcstombs: byte count not counted
Remove unneded casts in sgetrune/sputrune
Submitted by: wcstombs fix by Mihoko Tanaka <m_tonaka@pa.yokogawa.co.jp>
1996-04-18 07:01:46 +00:00
Joerg Wunsch aed8797028 Document the possible EPERM return.
Submitted by:	imp@village.org (Warner Losh)
1996-04-17 20:49:29 +00:00
Bill Paul 94c53e1fb5 NIS cleanups and fixes, the next generation.
getnetgrent.c:

- Catch one bogon that snuck by: in _listmatch(), check for '\0'
  rather than '\n'; strings returned from yp_match() are terminated
  with a nul, not a newline.

getpwent.c:

- Rip out all of the +inclusion/-exclusion stuff from before and
  replace it with something a little less grotty. The main problem
  with the old mechanism was that it wasted many cycles processing
  NIS entries even after it already knew they were to be exlcuded
  (or not included, depending on your pointof view). The highlights
  of these changes include:

  o Uses an in-memory hash database table to keep track of all the
    -@netgroup, -user, and -@group exclusions.

  o Tries harder to duplicate the behavior normally obtained when using
    NIS inclusions/exclusions on a flat /etc/passwd file (meaning things
    come out in much the same order).

  o Uses seperate methods for handling getpwent() and getpwnam()/getpwuid()
    operations instead of trying to do everything with one general
    function, which didn't work as well as I thought it would.

  o Uses both getnetgrent() and innetgr() to try to save time where
    possible.

  o Use only one special token in the local password database
    (_PW_KEYYPBYNUM) instead of seperate tokens to mark + and -
    entries (and stop using the counter tokens too). If this new
    token doesn't exist, the code will make due with the standard
    _PW_KEYBYNUM token in order to support older databases that
    won't have the new token in them.

  All this is an attempt to make this stuff work better in environments
  with large NIS passwd databases.
1996-04-16 00:22:41 +00:00
Bill Paul cbe78b44aa Fix a few NIS-related bogons:
- Clear the _yp_innetgr flag immediately after calling setnetgrent() from
  innetgr(). We only need the flag set to temporarily alter setnetgrent()'s
  behavior. Previously, it was being cleared too late.

- When in NIS-only mode, innetgr() was wasting time doing unecessary
  extra processing after it had already found a match.

- Remember to free memory allocated by the NIS functions during innetgr()
  searches.
1996-04-15 16:17:04 +00:00
Mike Pritchard 59f00bcdd9 Update the description of strncat to accurately describe how many
bytes are copied to the destination string.  Closes PR#1000.

Submitted by:	Dave Glowacki <dglo@ssec.wisc.edu>
1996-04-09 22:00:39 +00:00
Mike Pritchard 20631f47f1 Correct a minor typo. Fixes part of PR#1000.
Submitted by:	Dave Glowacki <dglo@ssec.wisc.edu>
1996-04-09 21:48:21 +00:00
Mike Pritchard e40f3f85d4 Do not install the now unsupported netns and netiso
related man pages.  Comment out cross references to those man
pages from other man pages.
1996-04-08 05:15:09 +00:00
Mike Pritchard edf0e5b3f8 Correct some man page xrefs, and some other minor changes to bring some
man pages up to mdoc guidelines and fix some minor formatting glitches.
Also fixed a number of man pages to not abuse the .Xr macro to
display functions and path names and a lot of other junk.
1996-04-08 04:18:31 +00:00
Mike Pritchard 906c1e27fc Correct some man page cross references and file location references. 1996-04-07 00:06:21 +00:00
Joerg Wunsch 29d221cde6 Mention other possible errors that could be caused by the F_[GS]ETOWN
commands.
1996-04-06 09:55:07 +00:00
Joerg Wunsch 9cb8a1050f Xref clocks(7). 1996-04-05 08:53:38 +00:00
Joshua Peck Macdonald 8098023dde Added a note about the return value. Its been so long I can't
remember who suggested the 'caveat' section.  Sorry.
1996-04-05 05:35:57 +00:00
Peter Wemm 7184fada11 Remove outdated (and never quite correct anyway) reference to the
"fact" that pipes were implemented as calls to socketpair().
1996-04-03 04:57:27 +00:00
Joerg Wunsch 4567abc2fa Xref sysexits(3). 1996-03-31 22:31:51 +00:00
Bruce Evans 0b50c8d653 stat() before open() because opening of special files may be harmful. 1996-03-29 12:55:54 +00:00
Andrey A. Chernov 81c280f58f Back out one of my previous changes: don't clear PARODD,
so return to absolute minimum of changed flags now
1996-03-28 13:33:18 +00:00
Andrey A. Chernov 9909e796b9 cfmakeraw:
clear PARODD bit too, help user program to set its own
parity via |
Set CREAD bit, it is 99% case
1996-03-27 21:29:32 +00:00
Mike Pritchard 064f007493 Added missing section numbers to a bunch of .Xr macros, or
converted them into .Fn macros where appropriate.  Also fixed
up some minor formatting problems.
1996-03-27 20:49:07 +00:00
Bruce Evans 1b5844118e Removed now-bogus casts that were to hide the inconsistency between the
nonstandard normal version and the standard threaded version.

Removed a bogus L in a constant.  fpos_t's aren't longs, and casting to
fpos_t would be verbose.
1996-03-27 18:07:29 +00:00
Bruce Evans 926bb1cf42 Fixed bogus cross references.
Reviewed by:	mpp
1996-03-27 17:54:40 +00:00
Bruce Evans fe20c3b61c Say what happens to the buffer when fgets() returns NULL.
Fixed bogus cross references and a misordered line.
1996-03-27 17:43:38 +00:00
Andrey A. Chernov 42ce22e449 8bit clean fixes 1996-03-25 14:34:26 +00:00
Andrey A. Chernov fe5fcbc78f Convert int to uchar range for ctype 1996-03-25 14:32:30 +00:00
Andrey A. Chernov 7871e36865 Remove half-dancing solution for signed chars to help finding
POSIXly-incorrect programs.
1996-03-25 13:43:24 +00:00
Andrey A. Chernov bf93970596 Remove half-dancing solution for signed chars to help finding
POSIXly-incorrect programs.
1996-03-25 13:35:36 +00:00
Andrey A. Chernov 06b47700ae Since n is int now, sanity check must be n <= 0, not simple n == 0 1996-03-25 12:03:11 +00:00
Joerg Wunsch e2c8e21d6b Make libdisk C++ aware:
- add __BEGIN_DECLS and __END_DECLS,
- add a bunch of ``const'' qualifiers all over the place,
- rename the `private' struct member into `private_data' to avoid the
  clash with the C++ keyword.
1996-03-24 18:55:39 +00:00
Paul Richards 880787f0fe Fix incorrect parameter types. 1996-03-24 15:49:34 +00:00
Bill Paul 20e4b00a08 Don't bother trying to flock() /var/run/ypbind.lock; this breaks when
/var/run resides on an NFS filesystem (flock() always returns 0 in
this case, so we falsely assume that ypbind is dead and bail out).

Settle instead for better failure checking when using clnttcp_create()
and clnt_call() to interact with ypbind. We still try to flock()
/var/yp/binding/$DOMAINNAME.2, but if this doesn't work, we drop into
the code that retrieves the binding information from ypbind directly.
If that also fails, then we're toast. On NFS filesystems, this means
we'll be ignoring the binding file for no reason and always talking to
ypbind even though we don't have to, but at least things will work.

(I could just replace the flock(/var/run/ypbind.lock) check with
an RPC call to ypbind's NULLPROC procedure, but if the flock() of
the binding file doesn't pan out we're going to try to talk to
ypbind later anyway. *sigh* Is NFS file locking ever going to work?)
1996-03-23 22:48:19 +00:00
Bill Paul ff27d2a474 Fix other half of problem reported in PR #1079: _getnetbynisaddr() is
broken. The translation from network number to ASCII string was not
working correctly (you would sometimes get things like 0.244.0.0 instead
of 244.0.0).

Also copied results of yp_match() to a static buffer for consistency
with gethostbynis.c.

Note: _getnetbynisaddr() chops off trailing .0's, i.e. 244.0.0 is
truncated to 244. By contrast, getnetbyht.c code (for local /etc/networks
lookups) leaves the traling .0's in place. This means that the NIS
and local file lookups will match different things when looking up the
same network number. I'm not sure which is the correct behavior. (I
think the DNS lookup code tries all combinations -- should the NIS
and local host lookup routines do that too?)
1996-03-23 22:16:22 +00:00
Bill Fenner 261a532a8b The 4.4-lite vfprintf counted the %# hex prefix and the sign in
the precision; ANSI X3J11 is not crystal clear but certainly says
that the precision specifies the number of /digits/, and signs
and "0x" aren't really digits.

NetBSD already has a similar patch.
1996-03-20 18:28:48 +00:00
Julian Elischer 5661849d54 keep the libc_r makefiles in step with those from libc
There needs to be a better way of doing this..
preferably we could add another pass to the
normal libc makefiles to do _r versions as well as _p versions
1996-03-20 03:05:34 +00:00
Bill Paul 08aff01b5d Fix yp_all() so that it doesn't bogusly return YP_NOMORE at the end
of a successful map retrieval. (This has to do with a previous change
to xdr_ypresp_all_seq() and ypxfr_get_map(); originally, yp_all()
would look for a return value of YP_FALSE to signal success, but now
it should be looking for YP_NOMORE. It should not be passing YP_NOMORE
back up to the caller though.)

Noticed by:  <aagero@aage.priv.no>

There is also another small bug here, which is that the call to
xdr_free() that happens immediately after the clnt_call() in yp_all()
clobbers the return status value. I've worked around this for now,
but I think the xdr_free() is actually bogus and should be removed.
I want to check some more before I do that though.
1996-03-19 19:27:03 +00:00
Bruce Evans 7041dd8c4b alarm -> ualarm. 1996-03-19 13:53:00 +00:00
Bruce Evans cc0ea3465d Updated a type to match Lite2's fixed-width type changes.
Added $Id$.

Obtained from:	4.4BSD-Lite2
1996-03-19 13:44:57 +00:00
Joerg Wunsch 85e04d81f6 Add libdisk. 1996-03-18 18:59:08 +00:00
Jordan K. Hubbard 198c323e44 Fix bogus MLINKS line. When is the old libdisk going to go away, BTW? 1996-03-18 15:15:42 +00:00
Joerg Wunsch 6db03f75e4 libdisk is now `adult':
. install libdisk.h into /usr/include
. add a (preliminary) manpage, mostly featured after phk's comments
  in libdisk.h
1996-03-17 23:20:09 +00:00
Guido van Rooij d1b44182d0 Work around a bug in the Sun rpc code. This fixes a problem where
a machine with aliase ip addresses on the same subnet of an
interfaces' `real' ip addresses would generate <n> duplicate
broadcasts in clnt_broadcast().
Basically, this fix does a purge on the list of bradcast addresses.
1996-03-17 20:12:53 +00:00
Peter Wemm 635d02db6f Repository copy src/release/libdisk to src/lib/libdisk as per recent
discussion on -core about disk partitioning tools etc.

Add NOPIC=yes to Makefile to prevent any possibility of version mismatch
because of the potential grave consequences. (as suggested by phk)

Note that this is also on RELENG_2_1_0, since the sysinstall stuff is
hopefully going to remain in sync.
1996-03-17 19:02:07 +00:00
Bill Paul 6daf17201b gethostbynis.c:
- Fix problem described in PR #1079: _gethostbynisaddr() doesn't
  work. Make it accept the same arguments as all the other
  gethostby*addr() functions and properly convert the supplied IP
  address into a text string so that yp_match() can find it in the
  hosts.byaddr map.

- Also fix potential memory leak: copy the results of yp_match() to
  a static buffer and free the result (yp_match() returns dynamically
  allocated memory).

ether_addr.c:

- Since I was in the neighborhood, fix ether_ntohost() and
  ether_hostton() so that they don't bogusly for a free(result)
  when yp_match() fails.
1996-03-16 21:25:59 +00:00
Jeffrey Hsu 37e4fbc4cb From Lite2: proc and file LIST changes 1996-03-11 05:34:46 +00:00
Jeffrey Hsu 4b10cdbc3d From Lite2: rename fs to vfs. 1996-03-11 03:08:51 +00:00
Jeffrey Hsu 782ff9b2f0 From Lite2: rename fs to vfs. 1996-03-11 03:06:45 +00:00
David Greenman 1821ce26bf Implemented negative caching on uid/gid lookup failures. This won't
matter much on some systems, but on ftp servers (like wcarchive) where
you run with special stripped group and pwd.db files in the anonymous
ftp /etc, this can be a major speedup for ls(1).
1996-03-05 13:11:42 +00:00
Peter Wemm c55acb6213 Update the current sigaction(2) man page to current reality..
* sigstack(2) -> sigaltstack(2).
* Document the SA_NODEFER flag
* Document the SA_RESETHAND flag
1996-03-03 14:52:54 +00:00
Jordan K. Hubbard 1303222562 Close PR#218. Don't reference non-existant dbm(3) and ndbm(3) manual
pages.
1996-03-03 08:53:05 +00:00
Peter Wemm 6f0989b711 Update the docs after the rename of SA_DISABLE and SA_ONSTACK when used for
ss_flags to SS_DISABLE and SS_ONSTACK.  SA_ONSTACK is still used in
struct sigaction.  Nowhere in our entire source tree could I find a
single place these were used.
1996-03-02 20:24:12 +00:00
Peter Wemm 7e6ace8561 If the send() to the AF_UNIX socket to the syslogd fails, attempt to
reconnect once using the saved openlog() parameters.

This helps one of the system startup race conditions. If syslogd takes too
long to get going, some daemons can fail the connection and forever log
to the console even though the syslogd is running.  That is ..unfortunate..
1996-03-02 19:56:16 +00:00
Peter Wemm 39d11944d4 Document the int -> size_t change to the m* syscalls 1996-03-02 17:34:28 +00:00
Wolfram Schneider a333649d00 Convert "time zone" to "timezone" in section NAME
Submitted by:	brien@cs.ucdavis.edu (David E. O'Brien)
1996-02-28 11:59:50 +00:00
Paul Traina f1e396bc53 Fix conflicts and merge into mainline 1996-02-27 19:42:00 +00:00
Paul Traina ef5d438ed4 Import updated Berkeley DB into CSRG branch 1996-02-27 01:59:15 +00:00
Bruce Evans 40b83e34a7 Don't trash %ebp.
Obtained from: NetBSD
1996-02-25 20:29:46 +00:00
Paul Traina 1f70cace69 move stat behind open to cover corner case 1996-02-25 04:50:21 +00:00
Peter Wemm 9c8e90ad85 Add minherit.2 to Makefile.. (oops, forgot it before) 1996-02-24 15:32:12 +00:00
Peter Wemm 7350dd84a0 If the two recently added sysctl variables exist, use those rather than
the statically compiled PS_STRINGS and USRSTACK variables.  This prevents
programs using setproctitle from coredumping if the kernel VM is increased,
and stops libkvm users (w, ps, etc) from needing to be recompiled if only
the VM layout changes.
1996-02-24 14:37:30 +00:00
Peter Wemm 781006180d rfork/minherit glue in libc
man pages adapted from OpenBSD's versions.
1996-02-23 19:56:55 +00:00
Paul Traina f0113fc0f7 If a .db file is 0 length, initialize it as if it did not exist.
Reviewed by:	wollman
1996-02-23 17:57:32 +00:00
Peter Wemm 574317c8f1 Add a dire warning about misusing the setlogin() system call. Be very
explicit that it is global to the entire "session", and that setsid() or
daemon() are need to have been called at some point.

The most notable offender of setlogin() misuse is XFree86's xdm.
1996-02-23 10:28:01 +00:00
John Polstra 89370a31f2 Changed the dimensions of __CTOR_LIST__ and __DTOR_LIST__ from 0
to 2.  This makes them agree with the declarations in libgcc, and
clears the way once again for linking c++rt0.o into all libraries,
and eliminating CPLUSPLUSLIB from <bsd.lib.mk>.  (I have not made
that change yet, because there is still a bootstrapping problem
for "make world".)

Also, removed a check which ensured that the constructor count in
the first word of __CTOR_LIST__ was greater than zero before
traversing the list.  I had added that check earlier, but it is no
longer necessary, now that there is guaranteed to be at least 2
words in __CTOR_LIST__.
1996-02-20 04:07:26 +00:00
Wolfram Schneider 4885b56627 man page links
fts_open.3 -> fts.3
fts_read.3 -> fts.3
fts_children.3 -> fts.3
fts_close.3 -> fts.3
1996-02-18 01:56:51 +00:00
Mike Pritchard 48194b7e82 Fix inet_network to not dump core if passed in an address
with more than 4 octets (e.g. 1.2.3.4.5).

Submitted by:	Amy Baron <amee@beer.org> via NetBSD-bugs
1996-02-17 21:11:36 +00:00
Peter Wemm 13295c7f99 Put in missing '_' in call to wrapper _thread_sys_sigsetmask() function. 1996-02-17 12:25:21 +00:00
John Polstra 82d29a82b5 Added a new module "uthread_autoinit.cc". This is a small C++ module.
It uses a static constructor to call _thread_init() at program start-up
time.  That eliminates the need for any initialization hooks in crt0.o.

Added a symbol reference in "uthread_init.c", to ensure that the new
module will always be pulled in when the archive version of the library
is used.

In "Makefile.inc", defined CPLUSPLUSLIB, so that the constructor will be
properly invoked in the shared library.

Suggested by: Christopher Provenzano, Peter Wemm, and others.
1996-02-17 02:19:37 +00:00
John Polstra 7732e08227 Removed "iso_addr.c" from the Makefile. Support for it has been removed
from the system, and a required include file no longer exists.
1996-02-17 02:12:47 +00:00
John Polstra 7a6b3357af Corrected a couple of errors in the fts(3) manual page. The prototype
for "fts_open" was wrong.  Also, the "fts_info" field of the FTSENT
structure was misleadingly described as containing "flags".  Actually, it
contains a single integer value.
1996-02-15 21:48:54 +00:00
Mike Pritchard e1f4e80c88 Fixed a bunch of man page cross references that were
in the main text of various man pages.

Thanks to Warner Losh for adding an option to manck to allow
it to scan the entire man page looking for bogus xrefs, instead
of just checking the SEE ALSO section.
1996-02-15 20:07:05 +00:00
Mike Pritchard d428a98d6d Added a little NOTES section explaining that passing in a string that
resides in read-only memory is going to cause the program to core dump,
and this is commmon with older pre-ANSI C programs.

(I've scratched my head over this one at 3 in the morning before
while trying to port some ancient program)

Suggested by:	Gary Kline <kline@tera.com>
1996-02-15 05:02:16 +00:00
Garrett Wollman cbc17e711e XNS sort-of-support is no more. 1996-02-13 17:30:37 +00:00
Joerg Wunsch eb5bc2e765 Include both, the regular and the `secure' libtelnet, when building
a release.
1996-02-13 09:17:42 +00:00
Poul-Henning Kamp 09d46ab02c Some fixes:
- shared libraries are in ${SHLIBDIR}, not necessarily in ${LIBDIR}.
- don't remove or create any shared library versions except 2.0.

and improvements:
- don't use rm -r.
- indent the long shell command.

Submitted by:	bde
1996-02-12 12:40:04 +00:00
Mike Pritchard 5f6bedf2ac Correct the xref for msgctl: msgctl(2) -> msgctl(3) 1996-02-12 07:06:23 +00:00
Mike Pritchard 2375385da1 Added man pages for msgctl(3), msgget(3), msgrcv(3) and msgsnd(3).
Obtained from: NetBSD
1996-02-12 07:03:24 +00:00
Mike Pritchard bcff8e2ae4 Another round of man page cleanups.
Down to only about 100 items left to cleanup! :-)
1996-02-12 04:57:03 +00:00
Mike Pritchard 4bd9ba3c2f Fixed some minor formatting problems to silence manck some more.
Corrected some bogus cross references to man pages that we don't/won't
have and either deleted them, or found a more appropriate man page
that we do have.  Various other minor changes to silence manck.

Manck is currently down to about 200 lines of errors, down from
the 500 - 600+ when I started all this.
1996-02-12 01:20:38 +00:00
Mike Pritchard 3656c5f4df Added a update(4) man page to describe the kernel initiated update
process and changed all of the old references to update(8) to update(4).
1996-02-12 00:45:47 +00:00
Mike Pritchard 5a489ac2b8 Minor cleanup of the rpc man pages to silence manck. 1996-02-12 00:02:42 +00:00
Mike Pritchard 3e6427f35f Correct man page section number references (e.g. don't use the
old 1M, 3X and 3S section numbers) and make some minor formatting
changes to silence manck.
1996-02-11 23:29:40 +00:00
Mike Pritchard 78b0b234eb Correct a bunch of man page cross references and generally
try and silence "manck".

ncurses, rpc, and some of the gnu stuff are still a big mess, however.
1996-02-11 22:38:05 +00:00
Poul-Henning Kamp cbbe7584d8 Add libfakegnumalloc. 1996-02-11 18:13:35 +00:00
Poul-Henning Kamp ff50d97b0f Make a scaffold libgnumalloc.so.#.# unless there is a packeage called
"gnumalloc*"
1996-02-11 18:12:42 +00:00
Mark Murray bbff7ca556 #include <kerberosIV/des.h> -> #include <des.h> 1996-02-11 09:18:18 +00:00
Poul-Henning Kamp c896bf9116 Don't install mdX.3, it's the template used to build the other pages. 1996-02-09 22:44:44 +00:00
Poul-Henning Kamp 5dc3e051ab Bill was a little to fast here... 1996-02-09 20:57:53 +00:00
Mike Pritchard c4c23c4df8 Another round of various man page cleanups. 1996-02-09 17:25:57 +00:00
Mike Pritchard 6fad16fd59 Add some missing MLINKS, correct some cross references, correct some
file locations and some minor formatting/style problems.
1996-02-09 16:20:10 +00:00
Jordan K. Hubbard a410855f63 Fixed docs/521. 1996-02-09 12:25:08 +00:00
Mike Pritchard 015234b2e8 Add a couple more man page links and some minor formatting fixes. 1996-02-09 02:49:14 +00:00
Mike Pritchard 50ab12d9c0 Correct one small typo in previous commit. 1996-02-09 00:48:52 +00:00
Mike Pritchard c211e812bb Added some missing MLINKS for section 3 man pages.
Also corrected a few minor formatting errors, file location and cross
references in some of the section 3 man pages.

This shuts up a lot of the output from "manck" for section 3.
1996-02-09 00:45:45 +00:00
Mike Pritchard 46285cbc83 Fix some minor formatting problems in the curs_termin.3 man page. 1996-02-08 22:25:44 +00:00
Mike Pritchard b0e4cfe40e Fix a typo in one of the function names. 1996-02-08 22:16:13 +00:00
Paul Traina cfbf02b6ad Clean up documentation on setuid/setgid bit handling. 1996-02-08 19:06:06 +00:00
Garrett Wollman 0761cb293e Remove support for OSI networking in user-land (#ifdef OSI aor CCITT)
in preparation for its removal from the kernel source tree.  NB: because
a function was deleted, libc is now at version 3.0 (was 2.2 previously).
1996-02-06 20:36:15 +00:00
Bill Paul 9a8c0cebf4 Make sure xdr_ypresp_all_seq() always returns a sane 'status' value.
(There were cases where it was leaving the status uninitialized.)
1996-02-04 05:05:43 +00:00
Mike Pritchard 5ea43fd200 Add some missing manual page links. 1996-02-02 17:48:46 +00:00
Wolfram Schneider 8ed714cd80 Submitted by: bruce, davidg, dyson
add a BUG section for mmap with current limitation
section SYNOPSIS completed
1996-02-02 05:06:29 +00:00
Mike Pritchard e2cc67ef3c Another round of spelling fixes. 1996-01-30 18:13:11 +00:00
Mike Pritchard a5ed710ccd Fix even more spelling errors in some more man pages. 1996-01-30 16:34:52 +00:00
Nate Williams 98c4ae7b2b Back out the thread_init code in order to allow -current to bootstrap
from -stable, until a better solution is found.

Submitted by:	Consensus of mailing list and the almighty Jordan :)
1996-01-30 05:55:20 +00:00
Mike Pritchard 70520b51b9 Getpwent() and getservent() can wind up calling free() with
an invalid pointer if a call to yp_first() fails.  Closes PR # 964,
and possibly # 952.
1996-01-29 20:16:30 +00:00
Joerg Wunsch 7c2f56cca5 Build libscrypt in addition to libdescrypt if RELEASEDIR is set.
Releases do need both libraries (they go into different distributions).
1996-01-24 21:32:46 +00:00
Nate Williams c524c9334d Bring in the man page additions for PT_ATTACH/DETACH|GET/SET_REGS that
were deleted out after the initial import now that Peter's code has
implemented them in -current.
1996-01-24 20:17:17 +00:00
Wolfram Schneider 3f22919355 note in bugs section: madvise not yet implemented 1996-01-23 23:33:55 +00:00
Mike Pritchard 86cfd0dd41 Changed the description of SIGSYS to better reflect what
it means when that signal is received.  Closes PR# 686.
1996-01-22 12:31:15 +00:00
Julian Elischer aaf0927a09 Obtained from: uthreads package 1996-01-22 00:32:08 +00:00
Julian Elischer 6b2590e7ca error handling for threaded apps 1996-01-22 00:26:12 +00:00
Julian Elischer 012dfd00b3 Reviewed by: julian
Submitted by:	 john birrel

One version of the pthreads library
another will follow with differnt actions under some cases..
not QUITE complete
1996-01-22 00:23:58 +00:00
Julian Elischer f70177e76e Reviewed by: julian and (hsu?)
Submitted by:	 John Birrel(L?)

changes for threadsafe operations
1996-01-22 00:02:33 +00:00
Nate Williams ae5d6711ff - FreeBSD'ized the ptrace manpage by removing non-FreeBSD specific portions.
- install ptrace.2
1996-01-20 17:56:06 +00:00
Nate Williams 55b697783d This commit was generated by cvs2svn to compensate for changes in r13519,
which included commits to RCS files with non-trunk default branches.
1996-01-20 17:35:25 +00:00
Nate Williams 6f2c1e42c7 ptrace(2) manpage 1996-01-20 17:35:25 +00:00
Mike Pritchard 270d3d754a Fix a variety of minor typos and cross references in a bunch of
man pages.

Masanobu Saitoh <msaitoh@spa.is.uec.ac.jp>
Giles Lean <giles@nemeton.com.au>
<soda@sra.co.jp>
1996-01-20 07:29:11 +00:00
John Polstra d5489b0d8f Check the count in the first word of __CTOR_LIST__ before executing
the loop that invokes the static constructors.  That makes it safe
to link c++rt0.o into any shared library, even one that does not
have any static constructors.  Formerly, doing that would cause a
bus error.  If the library has no static constructors, __CTOR_LIST__
comes out as a simple 4-byte COMMON region, and it does not have
the usual NULL word that terminates the list of constructors.  This
caused the old code to "call" a garbage address via the non-existent
entry __CTOR_LIST__[1].

The analogous code that invokes the static destructors was already safe.

This change is fully backward-compatible.

Reviewed by:	dfr@render.com (Doug Rabson)
1996-01-15 17:53:25 +00:00
Jordan K. Hubbard 4fab558b60 Return pointer to new hash node when search inserts it (e.g. there
was some datum given).
1996-01-13 14:25:04 +00:00
Peter Wemm 4faad310d3 The last of the bind-4.9.3-REL resolver merges. 1996-01-13 09:03:58 +00:00
Mike Pritchard b6607b59c8 Correct the strspn() man page so that it no longer references
itself as strcspn().

Obtained from:  NetBSD-bugs mailing list (PR# 1905)
1996-01-10 11:06:25 +00:00
Peter Wemm ab83cd2d54 Merge the 4.9.3-rel code into the res_* parts. The gethostXXXbyYYY
parts are not quite so simple..
1996-01-07 09:15:02 +00:00
Peter Wemm 25ae517921 This commit was generated by cvs2svn to compensate for changes in r13304,
which included commits to RCS files with non-trunk default branches.
1996-01-07 06:57:27 +00:00
Peter Wemm ffa065a6d4 Part of bind-4.9.3-rel.. This is for my convenience and reference.
This import to the vendor branch changes no files...
1996-01-07 06:57:27 +00:00
Poul-Henning Kamp 926cb56114 Fix a fencepost error.
Found by: Lars Fredriksen <fredriks@mcs.com>
1996-01-05 23:30:41 +00:00
Peter Wemm b8321444f8 Extract the login name when doing a ps on a dead kernel. 1996-01-01 17:08:17 +00:00
Peter Wemm 01cc6d5ae0 Document the change that I made to pipe(2) 1996-01-01 15:40:31 +00:00
Peter Wemm 3b7e1cc80f Bump libutil revision after recent addition of setproctitle().
Install (optional) libutil.h with prototypes for the functions and
document this in the man page.

minor cleanups to the various routines, include the prototype file, declare
return codes etc.
1996-01-01 08:27:41 +00:00
Joerg Wunsch 7560bb26ff Finally complete my fix for the behaviour of getpass(3) upon receipt
of signals.  Signals are now properly caught, tty state is being
restored, and the previous sigaction triggered.  Upon receipt of a
sigcont, echo is turned off again.

SIGTSTP causes a buffer flush, the man page mentions this.  (Although
i rather think of it as a feature than a bug.)

This is likely to be my last FreeBSD action for 1995, xearth shows
me that our .au guys must already write 1996. :-)
1995-12-31 14:00:25 +00:00
Peter Wemm 6065a0be11 This commit was generated by cvs2svn to compensate for changes in r13122,
which included commits to RCS files with non-trunk default branches.
1995-12-30 19:02:48 +00:00
Peter Wemm a5b996a7ec recording cvs-1.6 file death 1995-12-30 19:02:48 +00:00
Bruce Evans bb369b53b2 Added $Id$. 1995-12-30 07:01:50 +00:00
Bruce Evans 912e603778 Implemented non-statistical kernel profiling. This is based on
looking at a high resolution clock for each of the following events:
function call, function return, interrupt entry, interrupt exit,
and interesting branches.  The differences between the times of
these events are added at appropriate places in a ordinary histogram
(as if very fast statistical profiling sampled the pc at those
places) so that ordinary gprof can be used to analyze the times.

gmon.h:
Histogram counters need to be 4 bytes for microsecond resolutions.
They will need to be larger for the 586 clock.
The comments were vax-centric and wrong even on vaxes.  Does anyone
disagree?

gprof4.c:
The standard gprof should support counters of all integral sizes
and the size of the counter should be in the gmon header.  This
hack will do until then.  (Use gprof4 -u to examine the results
of non-statistical profiling.)

config/*:
Non-statistical profiling is configured with `config -pp'.
`config -p' still gives ordinary profiling.

kgmon/*:
Non-statistical profiling is enabled with `kgmon -B'.  `kgmon -b'
still enables ordinary profiling (and distables non-statistical
profiling) if non-statistical profiling is configured.
1995-12-29 15:30:05 +00:00
Gary Palmer b3d64ab72f Oops. I seem to have over-corrected with my last commit. It should be
right this time
1995-12-29 08:23:59 +00:00
Gary Palmer d28b4295fd Correct what seem to me to be some mistakes in the references and
standards sections. Also add a missing `,' to each file.
1995-12-28 21:06:07 +00:00
Joerg Wunsch 5237ee4167 Don't block SIGINT in getpass(3); this doesn't make sense. 1995-12-27 23:23:00 +00:00
David Greenman aacd7f348e Be smarter about handling overlapped copies and only go backwards if it
is really necessary. Going backwards on a P6 is much slower than forwards
and it's a little slower on a P5. Also moved the count mask and 'std'
down a few lines - it's a couple percent faster this way on a P5.
1995-12-27 18:47:45 +00:00
Peter Wemm 0050777196 Bring in an initial version of setproctitle().. This is intended to
replace the dozen other various hacks in the code that do all sorts
of crude things including spamming the envrionment strings with the new
argv string.

This version is mainly inspired by the sendmail version, with a couple of
ideas taken from the NetBSD implementation as well.
1995-12-26 22:50:08 +00:00
Bruce Evans 432889653c Added prototypes. 1995-12-26 13:25:13 +00:00
Poul-Henning Kamp 9100bbac3d Preallocate a small structure, so we can sbrk(2) further back.
Reviewed by:	phk
Submitted by:	Kaleb Keithly <kaleb@x.org>
1995-12-18 12:03:54 +00:00
Peter Wemm 6b492ae46d Cosmetic cleanup and documentation of kvm_argv.. Hopefully the flow of
the routine can be much more easily understood now... :-)
1995-12-16 09:25:17 +00:00
Bill Paul 9d80b1dd94 Clean up a few things left dangling after the last commit. The new
XDR routines auto-generated by rpcgen don't quite match the format of
the original ones even though tey have the same names (that was one of
the things wrong with the old XDR routines).
1995-12-15 03:26:40 +00:00
Bill Paul 0e276383fa Now that rpcgen is squared away, arrange to have all the NIS XDR routines
rpcgen-erated on the fly (just like librpcsvc).

Makefile: Add rule for generating yp_xdr.c and yp.h.

xdryp.c: gut everything except the special ypresp_all XDR function
         needed to to handle yp_all() (this one can't be created on
         the fly), and xdr_datum(), which isn't used internally by
         libc, but which as documented as being there in yp_prot.h,
         so what the hell. We now get everything else from yp_xdr.c.

yplib.c: change a few structure member names to match those found in
         yp.h instead of those declared in yp_prot.h.
1995-12-14 05:16:45 +00:00
Peter Wemm 04936d2e08 Change phkmalloc so that the page directory is now floating and allocated
via mmap() up around the shared library area.  Previously the directory
was allocated from space from it's own memory pool.  Because of the way it
was being extended on processes with large malloced data segments (ie: inn)
once the page directory was extended for some reason, it was not possible
to lower the heap size any more to return pages to the OS.
(If my understanding is correct, page directory expansion occurs at 4MB,
12MB, 20MB, 28MB, etc.)  I was seeing INN allocate a large amount of short
term memory, pushing it over the 28MB mark, and once it's transient demands
hit 28MB, it never freed it's pages and swap space again.)

I've been running this in my libc for about a month...

Also, seperate MALLOC_STATS from EXTRA_SANITY..  I found it useful to call
malloc_dump() from within INN from a ctlinnd command to see where the hell
all the memory was going.. :-)  I've left MALLOC_STATS enabled, as it has
no run-time or data storage cost.

Reviewed by: phk
1995-12-11 14:28:12 +00:00
Peter Wemm c60e216884 Add a structure definition to the MD* Contexts, so that cvs can use
the standard libmd version of MD5 instead of it's own seperate copy..
1995-12-11 02:18:22 +00:00
Bill Paul baadb8c9e4 Fix minor annoyance: have clnt_perror(), clnt_perrno() and
clnt_pcreateerror() emit strings with newlines appended like other
platforms do.
1995-12-10 17:40:18 +00:00
Peter Wemm a52219bb33 phkmalloc strikes again! :-) Another use of un-cleared returns from
malloc squashed...
1995-12-09 04:45:50 +00:00
Peter Wemm 77721f53be Updates to read the extra indirection in ps_strings. Note that any
static executables that depend on this will need to be relinked (ie: do
this before 'ps'), but the dynamic linked stuff should be OK (ie: 'w')

Obtained from: NetBSD (not much point reinventing the wheel.. :-)
1995-12-09 04:42:51 +00:00
David Greenman 0b7a315970 Include sys/time.h, not sys/user.h.
Submitted by:	"Marc G. Fournier" <scrappy@hub.org>
1995-12-08 08:47:41 +00:00
Bruce Evans 6bf4655faa Fixed type mismatches. 1995-12-07 12:50:56 +00:00
Peter Wemm 40b0c0d936 Update the -current sources from the 2.1 branch.
Approved (in spirit) by: jkh
1995-12-07 10:34:59 +00:00
Bill Paul de32dbbd5d Small tweak: don't try closing /etc/netgroup if we haven't opened it yet. 1995-12-02 21:54:59 +00:00
Peter Wemm e210ca89ca Fix PR#858, /bin/sh corruption caused by non-zeroed malloc() in libedit
in particular circumstances. (malloc() does not zero memory, but usually
does by coincidenct that sbrk() returns zeroed pages)

Submitted-by: John Hood <cgull@smoke.marlboro.vt.us>
1995-12-02 09:43:43 +00:00
Bruce Evans 1d064c3b2d Restored [u]cmpdi2.c which are needed for switching on [unsigned] long
long values.
1995-12-01 09:38:35 +00:00
Andrey A. Chernov ab808bfb5d Add cfree.3 1995-11-29 21:39:57 +00:00
Bruce Evans dce5165a30 Removed cmpdi2.c from ${SRCS}. I think it is no more needed than ucmpdi2.
Restored order in ${SRCS}.
1995-11-29 15:11:43 +00:00
Joerg Wunsch 68b8d35346 Add a short man page for cfree(3), in order to hint people about its life in libcompat. 1995-11-24 08:36:51 +00:00
Mark Murray 3fcee20fa4 Removed reference to missing libmp in a comment. We have GNU MP now. 1995-11-12 19:32:24 +00:00
Bill Paul 0f98415ed4 - Make _do_ypbind() check for /var/run/ypbind.lock and attempt to flock()
it before before trying to establish a binding. If /var/run/ypbind.lock
  doesn't exist, or if it exists and isn't locked, then ypbind isn't
  running, which means NIS is either turned off or hosed.

- Have _yp_check() call yp_unbind() after it sucessfully calls yp_bind()
  to make sure it frees resources correctly. (I don't think there's really
  a memory leak here, but it seems somehow wrong to call yp_bind() without
  making a corresponding call to yp_unbind() afterwards.)

This makes the NIS code behave a little better in cases where libc makes
calls to NIS, but it isn't running correctly (i.e. there's no ypbind).

This cleans up some strange libc behavior that manifests itself if
you have the system domain name set, but aren't actually running NIS.
In this event, the getrpcent(3) code could try to call into NIS and
cause several inexplicable "clnttcp_create error: RPC program not
registered" messages to appear. This happens because _yp_check() checks
if the system domain name is set and, if it is, proceeds to call
yp_bind() to attempt to establish a binding. Since there is no
binding file (remember: ypbind isn't running, so /var/yp/binding
will be empty), _yp_dobind() will attempt to contact ypbind to
prod it into binding the domain. And because ypbind isn't running,
the code generates the 'clnttcp_create' error. Ultimately the
_yp_check() fails and the getrpcent(3) code rolls over to the /etc/rpc
file, but the error messages are annoying, and the code should be
smart enough to forgo the binding attempt when NIS is turned off.
1995-11-05 05:39:04 +00:00
Bill Paul 215032be8c Add NIS support to getservent(3) functions (getservbyport() and getservbyname()
both call getservent() to do most of the work, so we only need to modify
this file to take care of everybody).

Note that there is only one NIS services map (services.byname) even
though there are getservbyname() and getservbyport() library functions.
1995-11-04 19:07:27 +00:00
Garrett Wollman 2f7778001d Document recent changes in socket buffers and listen(2). 1995-11-03 18:34:38 +00:00
Andrey A. Chernov 42ef439996 Add more stuff moved out from XPG3 1995-11-03 09:03:00 +00:00
Andrey A. Chernov f9cbdf410e Move more stuff out to XPG4
Handle negative chars inside runetype/tolower/toupper
1995-11-03 08:59:02 +00:00
Andrey A. Chernov 3e912c9dee Remove my locale hack. Sigh. 1995-11-02 12:42:42 +00:00
Poul-Henning Kamp 05fc2de514 Clean up and make code (more) readable. 1995-10-29 09:49:21 +00:00
Poul-Henning Kamp d12f212098 Add #include <sys/user.h>. 1995-10-28 16:14:18 +00:00
Adam David 5f0d67bea7 misc typos 1995-10-27 16:56:53 +00:00
Andrey A. Chernov 9f23763a01 Remove unneded ctype.h 1995-10-26 22:32:00 +00:00
Julian Elischer cc6a66f20e Reviewed by: julian and jhay@mikom.csir.co.za
Submitted by:	Mike Mitchell, supervisor@alb.asctmd.com

This is a bulk mport of Mike's IPX/SPX protocol stacks and all the
related gunf that goes with it..
it is not guaranteed to work 100% correctly at this time
but as we had several people trying to work on it
I figured it would be better to get it checked in so
they could all get teh same thing to work on..

Mikes been using it for a year or so
but on 2.0

more changes and stuff will be merged in from other developers now that this is in.

Mike Mitchell, Network Engineer
AMTECH Systems Corporation, Technology and Manufacturing
8600 Jefferson Street, Albuquerque, New Mexico 87113 (505) 856-8000
supervisor@alb.asctmd.com
1995-10-26 20:31:59 +00:00
Andrey A. Chernov 7f3f016d8c Fix it for chars with 8bit set 1995-10-23 20:49:58 +00:00
Andrey A. Chernov 34d08e870e Treat empty encoding as "C" encoding 1995-10-23 20:20:11 +00:00
Andrey A. Chernov 377da8e867 Optimize PathLocale handling.
Handle C/POSIX/"" properly.
Don't reset collate to C when it is unnecessary
1995-10-23 20:08:24 +00:00
Andrey A. Chernov 2d542a0868 Don't reset LC_TIME to C when it isn't neccessary 1995-10-23 19:52:43 +00:00
Andrey A. Chernov 24c9187962 Use fake (empty) startup_setlocale for XPG4 1995-10-23 02:25:53 +00:00
Andrey A. Chernov 9d45c3af90 Reduce static binaries bloat by splitting out normally unused
setinvalidrune()
1995-10-23 02:13:05 +00:00
Andrey A. Chernov 0975d201e0 libxpg4 added 1995-10-23 01:50:11 +00:00
Andrey A. Chernov 5b01b59e21 XPG4 hook 1995-10-23 01:45:42 +00:00
Andrey A. Chernov 350a3d3e48 Migrate from XPG4 to XPG3 (libxpg4 will be added soon)
Remove big part of my startup_setlocale hack.
Add missing manpage links.
1995-10-23 01:34:17 +00:00
Bruce Evans 6644bf3e9b Undo the the changes in the previous revision (MANSRC now works right again).
Use ${INSTALL} instead of install.
1995-10-22 19:16:01 +00:00
Bruce Evans 1b88e35b80 Update to 4.4lite2 (clean up includes; initialize the name of the master
pty correctly (it was broken for calls to openpty() after the first
successful one)).
Obtained from:	4.4lite2
1995-10-22 19:11:12 +00:00
Bruce Evans 5e0a7c7c40 Removed unnecessary include of <sys/tty.h>. tty.h apparently once had
some user interfaces in it.  It no longer does.
1995-10-22 18:52:23 +00:00
Bruce Evans ee810ef23e Update to 4.4lite2 (initialize arrow key data completely). 1995-10-22 18:49:04 +00:00
Bruce Evans 3b4058284e Fixed lint from cc -Wall.
Cleaned up includes.
1995-10-22 18:43:26 +00:00
Bruce Evans ccbc94648a Fixed dependencies for scrt0.o.
Build a static gcrt0.o (sgcrt0.o) too.  Currently only the dynamic gcrt0.o
is used, although -pg forces -static.
Sorted the .o targets.
1995-10-22 18:36:47 +00:00
Bruce Evans 5308354b7e Fixed use of too many args for `.Em'.
Fixed description of domain of y*().
Fixed description of error domain.  (This description is still half
redundant and half wrong, as in many other math man pages.  fdlibm
doesn't support the VAX or Tahoe.)
Fixed capitalization of `Bessel'.
1995-10-22 18:16:39 +00:00
Poul-Henning Kamp 29285d6cc5 minor cleanup, #includes. 1995-10-22 14:53:58 +00:00
Poul-Henning Kamp 88640ee125 Mino cleanup, #includes & unused vars. 1995-10-22 14:53:17 +00:00
Poul-Henning Kamp c0d41487f2 Minor cleanup, #include's and unused vars.
Added compile-time warning to an old funky function.
1995-10-22 14:52:30 +00:00
Poul-Henning Kamp 4c3af266f6 Well, cvs commit core'ed on me, I belive I have got all the locks out,
but a commit mail got lost, it's the same as for this commit:

 lib/libc/gen  confstr.c crypt.c disklabel.c fstab.c getcap.c
          getgrent.c  getgrouplist.c getpass.c getpwent.c
          initgroups.c nlist.c  psignal.c pwcache.c setmode.c
          sleep.c sysconf.c sysctl.c  syslog.c usleep.c
 lib/libc/locale  none.c read_runemagi.c setlocale.c
 lib/libc/net  gethostbydns.c getnetbydns.c getnetbynis.c
 lib/libc/nls  msgcat.c
 lib/libc/quad  Makefile.inc
 lib/libc/regex  engine.c regcomp.c regerror.c

	Minor cleanup, mostly unused vars and missing #includes.
	Limit the number of quad functions we pull in for 'i386'.
	I still belive the quad stuff should go back into gcc.
	Add compile-time warnings about crypt functions.
1995-10-22 14:51:39 +00:00
Poul-Henning Kamp f824233e9e Remove EXTRA_SANITY, fix a unused var. 1995-10-22 14:47:00 +00:00
Poul-Henning Kamp 16252f1166 More cleanup.
Uhm, I also forgot: I took "EXTRA_SANITY" out of malloc.c
1995-10-22 14:40:55 +00:00
Poul-Henning Kamp e2a4bdf63c limit the number of functions we pull in for 'i386'.
I still belive this stuff should go back into gcc.
1995-10-22 14:40:17 +00:00
Poul-Henning Kamp 739398ee03 and so on... 1995-10-22 14:39:22 +00:00
Poul-Henning Kamp fce61be7f5 As above. 1995-10-22 14:39:06 +00:00
Poul-Henning Kamp 696cbd5ff2 As above.
Oh I also put in a couple of compile-time warnings for the crypt stuff.
1995-10-22 14:38:48 +00:00
Poul-Henning Kamp 8b10240709 Minor cleanup, mostly unused vars and missing #includes. 1995-10-22 14:37:11 +00:00
Joerg Wunsch 0859bf6ff4 Finally catch up with the Frenchmen, and create the German message
catalog.
:-)
1995-10-21 23:47:43 +00:00
Peter Wemm fc370289ab Add $Id$ since this version of the file has diverged from the BSD base a
fair bit.  I forgot to add it when I made the fixes some time ago.
1995-10-21 07:05:01 +00:00
Poul-Henning Kamp 6b44b1a3fa -fomit-frame-pointer is becomming an increasingly popular optimization,
so before somebody screws up royally, make sure this always works by
adding a -fno-omit-frame-pointer here.
1995-10-20 20:05:15 +00:00
Andrey A. Chernov 32e0d22da8 Propogate default table to restricted 8859-1 template
(only control/graph/punct/print tags used)
Based on: kaleb@x.org and Bruce suggestions
1995-10-19 19:29:55 +00:00
Joerg Wunsch b788806eb4 Remove the bugs section. sh(1) now has a ulimit builtin. 1995-10-19 18:45:44 +00:00
Poul-Henning Kamp ee61b5a715 put the _getenv and _strncmp under #ifdef DEBUG, which is the only time
they are used.  Saves a few bytes here and there, nothing major.
1995-10-18 15:56:55 +00:00
David Greenman 14c175f7a9 Create a scrt0.o file that specifically excludes the shared-lib support.
This will be used for -static programs.
1995-10-18 04:19:00 +00:00
David Greenman 283e0c0eb7 Doubled the performance of getenv()/__findenv() by rewriting it to not
use strncmp()..
1995-10-17 21:37:41 +00:00
Poul-Henning Kamp eba2673a3f Add moncontrol.3 -> monstartup.3 link here. 1995-10-15 17:40:20 +00:00
Bill Paul 3948edc24c Another tweak/speedup pass:
- Fix buffer overflow problem once and for all: do away with the buffer
  copies to 'user' prior to calling _scancaches() and just pass a pointer
  to the buffer returned by yp_match()/yp_first()/yp_next()/whatever.
  (We turn the first ':' to a NUL first so strcmp() works, then change it
  back later. Submitted by Bill Fenner <fenner@parc.xerox.com> and
  tweaked slightly by me.

- Give _pw_breakout_yp() the 'more elegant solution' I promised way back when.
  Eliminate several copies to static buffers and replace them with just
  one copy. (The buffer returned by the NIS functions is at most
  YPMAXRECORD bytes long, so we should only need one static buffer of
  the same length (plus 2 for paranoia's sake).)

- Also in _pw_breakout_yp(): always set pw.pw_passwd to the username
  obtained via NIS regardless of what pw_fields says: usernames cannot
  be overridden so we have no choice but to use the name returned by
  NIS.

- _Again_ in _pw_breakout_yp(): before doing anything else, check that
  the first character of the NIS-returned buffer is not a '+' or '-'.
  If it is, drop the entry. (#define EXTRA_PARANOIA 1 :)

- Probe for the master.passwd.* maps once during __initdb() instead
  of doing it each time _getyppass() or _nextyppass() is called.

- Don't copy the NIS data buffers to static memory in _getyppass()
  and _nextyppass(): this is done in _pw_breakout_yp() now.

- Test against phkmalloc and phkmalloc/2 (TNG!) to make sure we're
  free()ing the yp buffers sanely.

- Put _havemaster(), _getyppass() and nextyppass() prototypes under
  #ifdef YP. (Somehow they ended up on the wrong side of the #endif.)

- Remove unused variable ___yp_only.
1995-10-11 21:35:08 +00:00
Poul-Henning Kamp 7aa70c9e8e phkmalloc/2
"zero' and 'junk' options to help find and diagnose malloc abuse.
EXTRA_SANITY defaults "junk" to on.
Don't dump the internal state, unless EXTRA_SANITY.
General code cleanup.
Error messages cleaned up a bit, more checking earlier.
EXTRA_SANITY is default at this time (just in case).
Performance (without EXTRA_SANITY) is better, beats gnumalloc in
both time & space most of the time:

	# In-memory test.
	./malloc 50000000 2000 8192
	159.2u 1.5s 2:41.85 99.3% 5+7742k 0+0io 0pf+0w
	./gnumalloc 50000000 2000 8192
	272.6u 0.4s 4:35.01 99.3% 5+8533k 0+0io 0pf+0w

	# Swap-space test.
	./malloc 500000 14000 8192
	6.5u 4.1s 4:08.87 4.3% 5+49209k 0+0io 9772pf+0w
	./gnumalloc 500000 14000 8192
	16.2u 14.5s 15:36.14 3.2% 5+54100k 0+0io 47651pf+0w

	# Small items test.
	./malloc 20000000 20000 2048
	67.0u 0.3s 1:07.83 99.2% 5+18199k 0+0io 4pf+0w
	./gnumalloc 20000000 20000 2048
	66.2u 0.3s 1:07.03 99.3% 5+18107k 0+0io 0pf+0w

SANITY is not an option anymore. (!!)
1995-10-08 18:44:20 +00:00
Bill Paul eb6c139019 Some NIS bug stomping:
- In some cases, we don't properly resolve _all_ possible group memberships.
  If a user is a member of both local and NIS groups, we sometimes lose some
  of the membership info from NIS. (Reported by: Thorsten Kukuk
  <kukuk@uni-paderborn.de>)

- Make NIS +groupname overrides actually work the way the SunOS group(5)
  man page says they should (make them work for all cases: getgrent(),
  getgrnam() and getgrgid()).

- When not compiled with -DYP, grscan() should ignore entries that
  begin with a '+'. When compiled _with_ -DYP, grscan() should ignore
  +groupname entries that don't refer to real NIS groups.

- Remove redundant redeclaration of fgets(), strsep() and index() inside
  grscan(). We already #include all the right header files for these.

Note: -groupname exclusion as specified in the Sun documentation still
isn't supported. This'll be a 2.2 addition. Right now I just want this
stuff to work.
1995-10-06 21:29:01 +00:00
Poul-Henning Kamp fcce81cde3 remove GCC support functions from libc.
Should never have been here in the first place.
1995-10-05 10:24:57 +00:00
Peter Wemm 11e67a9f2e Fix the problem that I aroused with the last commit..
What was happening, is if syslogd was not running, syslog() would do
a strcat("\r\n") on a non-null-terminated buffer, and write it to the console.

This meant that sometimes extra characters could be written to the console
during boot, depending on the stack contents.

This totally avoids the potential problem by using writev() like the rest
of the does, and avoid modifying the buffer after the trouble we've gone to
to carefully protect it.

This is actually a trivial fix, in spite of the long commit message.. :-)
It only appeared during boot and shutdown with syslogd stopped.
1995-10-05 00:11:15 +00:00
Peter Wemm 216b9a0d22 Make a link-time warning for the use of gets().
IMHO, the run-time warning should come out, but I'm not game to start that
fight yet...  This uses a feature of the gnu linker.

Inspired by:  NetBSD
1995-10-04 18:29:01 +00:00
Poul-Henning Kamp bf529a66d9 Calling sbrk(2) with zero argument doesn't need to generate a syscall.
Reviewed by:	bde
1995-10-04 15:58:57 +00:00
Joerg Wunsch 5f5555b1ea Add man pages for the SYSV shm* and sem* functions.
This partially closes PR # docs/177.
This should probably also go into 2.1.

Submitted by:	daveho@infocom.com (David Hovemeyer)
1995-10-03 19:17:21 +00:00
Garrett Wollman 973f098aab Compress manual pages (if desired) in the obj directory rather
than in the installation destination.  Should make release-building
substantially faster.  The msun Makefile changes simple adapt to the new
scheme.
1995-10-02 20:02:05 +00:00
Andrey A. Chernov e6af2dc882 Build secure libcrypt if available and allowed 1995-09-29 19:56:05 +00:00
Andrey A. Chernov 153193f392 Build secure libtelnet if available and allowed 1995-09-29 19:45:25 +00:00
Bruce Evans 372e515faa This gets() used \r\n, which is doggish. 1995-09-29 18:52:47 +00:00
Jean-Marc Zucconi f310327a5b Update to the 1995/09/20 version. Previous version was 1993/12/17. 1995-09-28 20:49:15 +00:00
Nate Williams 4d2131fbc9 Fixup the "ld.so failed" message for the case when ld.so finds undefined
symbols.

An easy example to see this is to develop an X program which links
against Xt, but doesn't add -lX11 to the link line.  It will link fine,
but cause run-time errors by ld.so because of missing symbols used by Xt
defined in X11.  This patch makes the errors more readable.

Submitted by:	jdp@polstra.com (John Polstra)
1995-09-27 23:13:33 +00:00
Peter Wemm fcc3b6999e Make ttyname() use posix-style tcgetattr() to check to see that it's
running on a tty.  (Same as isatty()) The old-style TIOCGETP ioctl
wouldn't fly if the kernel didn't have COMPAT_43.
Submitted by:	Carl Fongheiser <cmf@netins.net>
1995-09-22 17:01:28 +00:00
Poul-Henning Kamp 182b05e19e A buglet when dumping and a stylistic point from Mike.
Submitted by:	Mike Pritchard <mpp@mpp.minn.net>
1995-09-22 14:11:00 +00:00
Paul Richards 0e011b5407 Removed libdialog. 1995-09-16 16:25:25 +00:00
Poul-Henning Kamp 81df7b69ef ``phkmalloc''
Performance is comparable to gnumalloc if you have sufficient RAM, and
it screams around it if you don't.
Compiled with "EXTRA_SANITY" until further notice.
see malloc.3 for more details.
1995-09-16 09:28:13 +00:00
Peter Wemm 7c8e2aa48c Fix security bugs with a "new approach", using stdio's powerful buffer
control hooks.
It is similar to an unrolled multi-part snprintf(), in that a "FILE *" is
attached to a string buffer.  There is also an optimisation for the case
where the syslog format string does not contain %m, which should improve
performance of "informational" logging, like from ftpd.
1995-09-15 13:53:39 +00:00
David Greenman 03a9df25d1 Indicate that backlog limit is 32. 1995-09-15 10:02:07 +00:00
Paul Richards d189bfa4d3 Add missing internal object functions, hard-coded for ncurses for now. 1995-09-13 18:04:35 +00:00
David Greenman d49b5c24e6 Back out that last change; we don't build this shared. 1995-09-06 14:34:50 +00:00
David Greenman ed79e03022 Bumped shared lib rev to 2.1. 1995-09-06 14:27:07 +00:00
Bill Paul 400b841301 getgrent.c: adjust _nextypgroup() slightly so that it continues processing
the group map after encountering a badly formatted entry.

getpwent.c: same as above for _nextyppass(), and also turn a couple of
sprintf()s into snprintf()s to avoid potential buffer overruns. (The
other day I nearly went mad because of a username in my NIS database
that's actually 9 characters long instead of 8. Stuffing a 9-character
username into an 8-character buffer can do some strange things.)

(This reminds me: I hope somebody's planning to fix the buffer overrun
security hole in syslog(3) before 2.1 ships.)
1995-09-05 19:52:59 +00:00
Bill Paul 4cc738f763 Clear up a minor bogosity in yp_match(): we have YPMATCHCACHE turned
on, which is fine, except that _yp_dobind() is called before we check
the cache. The means we can return from the cache check (if we have
a hit) without calling _yp_unbind().

We should do the cache check first and _then_ drop into the section
that binds the server and does the yp_match query.
1995-09-02 04:16:21 +00:00
Bill Paul d454389cc2 getpwent.c: turn the code that checks the override caches into a
seperate function to avoid duplication. Also fix getpwent() a
small bit to properly handle the case where the magic NIS '+'
entry appears before the end of the password file.

getgrent.c: be a little more SunOS-ish. Make it look like the NIS
group map is 'inserted' at the the point(s) where the magic NIS '+'
entry/entries appear.

getgrent: fix a file descriptor leak: remember to close the netgroup
file after we determine that we're using NIS-only innetgr() lookups.
1995-09-02 04:08:55 +00:00
Andrey A. Chernov b247e376cd Change my parse fix from 'return argc' to 'return 0'.
Pointed by: davidg
1995-08-30 17:59:59 +00:00
Andrey A. Chernov 85b3ab5887 National date/time representation in syslog logfiles looks ugly,
change strftime to ctime. Logfiles must have default (english) date/time
representation for access/view from various places.
1995-08-29 13:21:53 +00:00
David Greenman bdc3c66075 Brought in changes from rev 1.14.2.1 into main branch. 1995-08-26 04:57:03 +00:00
Peter Wemm 613749bbf2 Remove the CFLAGS+=-I${CURDIR}/net that I previously added.
Since Bruce changed the #include <res_config.h> to #include "res_config.h"
this is no longer needed, and only makes the 'make' more verbose for
no real reason.
1995-08-21 17:50:01 +00:00
Bruce Evans 4fc61ca748 Define DEBUG as 1 instead of as nothing so that it doesn't conflict with
-DDEBUG in libresolv/Makefile.
1995-08-21 09:16:02 +00:00
Bruce Evans e6507d611f Fix bogus include paths, some of which stopped libresolv from compiling. 1995-08-21 09:15:40 +00:00
Peter Wemm e5ad4f8712 Update the resolver part of libc to bind-4.9.3-beta24 level (from beta9p1)
Note that this was done by selective patching from diffs, to not conflict
with the 4.4bsd base code..  This was *not* a trivial task..  I have been
testing this code (apart from cosmetic changes) in my libc for a while now.

Obtained from: Paul Vixie <paul@vix.com>
1995-08-20 20:03:06 +00:00
Peter Wemm fdf4460bf9 fgetline does not exist.. fgetln is in it's place. Correct the X-Ref.
Noticed by:	Brian Tao, Bruce Evans
1995-08-18 14:22:00 +00:00
Joerg Wunsch 665994990b There is no such file as /usr/include/ufs/quota.h. There is a file
/usr/include/ufs/ufs/quota (#include <ufs/ufs/quota.h>) that seems to work
ok though.

Closes PR # docs/670: quotactl man page incorr...

Submitted by:	evans@scnc.k12.mi.us (Jeffrey Evans)
1995-08-15 19:38:00 +00:00