Commit graph

885 commits

Author SHA1 Message Date
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