Commit Graph

1363 Commits

Author SHA1 Message Date
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
Peter Wemm 836a60691b Regenerate. This backs out my previous change to TCL_SHLIB_SUFFIX, since
it has side effects elsewhere.
1996-10-31 16:09:04 +00:00
Andrey A. Chernov 7a15396329 Replace collate_range_cmp call with its code 1996-10-31 04:55:47 +00:00
Andrey A. Chernov c61cea7272 collate_range_cmp -> __collate_range_cmp 1996-10-31 04:38:21 +00:00
Andrey A. Chernov edcfa07284 collate_range_cmp -> __collate_range_cmp 1996-10-31 04:32:27 +00:00
Andrey A. Chernov 38aa46cdf0 Rename collate_range_cmp to __collate_range_cmp for internal usage
inside libc. Add collate_range_cmp as alias to __collate_range_cmp
for temp. backward compatibility.
collate_range_cmp will be replaced with direct code for each
external program for compatibility with the rest of world
1996-10-31 04:25:14 +00:00
Peter Wemm e6f0209e40 Regenerate.
No changes other than "instructions" for what other tools that use this
.. "interesting" ..  system should name their shared libraries.  This was
broken for some tools (eg: expect-5.21) even for the native tcl build (ie,
it would end up using libexpect521.so, not libexpect521.so.1.0)
1996-10-30 08:49:33 +00:00
Poul-Henning Kamp f3f639a106 If you run with option Z and malloc fails, memset gets called
with a NULL pointer (archie)
Explain that minsize is also the smallest alignment.

Submitted by:	Archie Cobbs <archie@whistle.com>
1996-10-29 20:35:39 +00:00
Peter Wemm 62875fe88b Regenerated.. Use new minor number for both installed names, not just
one of them.
1996-10-29 04:36:25 +00:00
Wolfram Schneider 9c91ce9853 Do not make symbolic links from obj directory into source tree,
it may break `make reinstall'. Use cp(1).

simplify makefile
1996-10-26 23:38:07 +00:00
Joerg Wunsch 55e0d3b7cf Fix an off-by-one error in getvfsent().
Detected by: phkmalloc :)
1996-10-26 21:53:21 +00:00
Alexander Langer 90a720bc0d Note that streams are now flushed on abort.
Change standards section to reflect POSIX 1003.1-1990 conformance.
1996-10-26 18:14:44 +00:00
Poul-Henning Kamp 7bd7818f1c Various cosmetics
Improve chances of troublefree 64bit operation. [imp]

Noticed by:	Warner Losh <imp@village.org>
1996-10-26 08:19:07 +00:00
Alexander Langer a3f90e9bd5 POSIX requires stdio buffers be flushed on abort.
Obtained from:	OpenBSD, Thorsten Lockert <tholo@OpenBSD.ORG>
1996-10-26 01:42:33 +00:00
Bruce Evans 1ab6205ce1 Moved #include of <sys/types.h> earlier so that this compiles when
<stdio.h> doesn't (bogusly) include <sys/types.h>.

Cleaned up #includes.
1996-10-25 06:48:29 +00:00
Andrey A. Chernov 3deeb59da9 GNU-style changes:
1) Rename FNM_ICASE to FNM_CASEFOLD
2) Add FNM_LEADING_DIR
Add proper (unsigned char) casts to tolower().
Use 'char' function argument for proper sign extension
1996-10-23 16:40:20 +00:00
Andrey A. Chernov 967a5cb181 Simplify debug output
Simplify collate_range_cmp for ASCII-compatible collate we have now
1996-10-23 15:35:46 +00:00
Poul-Henning Kamp 52377df350 Add #include <sys/types> 1996-10-22 16:28:56 +00:00
Poul-Henning Kamp 40060a90b9 close bin/1648 libmd not 64bit safe.
if something fails to compile now, you need to add #include <sys/types.h>

Partially Submitted by:	Jason Thorpe <thorpej@nas.nasa.gov>
1996-10-22 16:27:47 +00:00
Joerg Wunsch a098bfd775 Fix a potential memory leak i've introduced with my recent patch.
Reviewed by:	bde
1996-10-21 23:56:23 +00:00
Wolfram Schneider 95e4966c47 add flag FNM_ICASE for case insensitve search
Reviewed by: ache
1996-10-20 15:15:59 +00:00
Poul-Henning Kamp 2e7c91ff16 malloc_pages should be static.
Add progname to warning/error message layout. (joerg)
Remove inline assembler, no speed impact, not need for the obfuscation (bde)
Remove on the fly calculation of parameters, no longer critical.
Make D & U flags valid even if we don't support them.
Don't call imalloc until we're done initializing.
Zap contents on free() if we have "Junk" set. [*]
Various nitpicking.

[*] As a sideeffect of this change, if you are worried about
sensitive data lingering in memory, you can use the 'Junk' option
now to make sure phkmalloc zaps memory when it is returned.  add
	char * malloc_options = "J";
to your source.  Obviously there is a performance impact.
1996-10-20 13:20:57 +00:00
Joerg Wunsch 5fae0297db Remove the arbitrary limit for the line length in /etc/ttys, and make
the buffer dynamic.

Closes PR # misc/1838: getttyent() arbitrary 100...
1996-10-19 16:29:10 +00:00
Peter Wemm ba8f828b88 Back out most of the last backout. :-) Guido removed the 1.1.1.1->1.1.1.2
changes from the vendor branch as well, backing the db-1.82 changes.

This file should now be the same as it was in rev 1.1.1.2.
1996-10-19 01:34:25 +00:00
Guido van Rooij c3449f0d2b Backout bzero patch.
Somehow, I also managed to get quite some other changes in this file at
the same time. All I did was checkout the file and  made a single change.
If someone has an explanation how these PURIFFY defines got in...
1996-10-18 19:56:51 +00:00
Andrey A. Chernov 9fe1a5aaab After some thinking implement alternative way:if it is impossible
to confirm password, don't tell that s/key required, but
ask for password in anycase. It looks like non-s/key system
from outside.
1996-10-18 16:52:33 +00:00
Andrey A. Chernov 4737abd588 Make PERMIT_CONSOLE to work not only from
/dev/console, but from syscons vty's too
1996-10-17 21:49:34 +00:00
Guido van Rooij 102b3fa4c8 When freeing buffers in the db routines, also zeroize them
This should solve the bug where a coredumping ftpd reveals
encrypted passwords.
Obtained from: OpenBSD
1996-10-17 18:27:58 +00:00
Andrey A. Chernov 6903b42cd8 Change "nope" to ":"
Previous variant not work well, if you have a user with name nope
1996-10-17 16:47:22 +00:00
Andrey A. Chernov 811a3c8d54 Prevent namespace pollution cause by this library by splitting to
API and non-API functions and giving _sk_ prefix for all non-API
functions. Old names will be available by _SKEY_INTERNAL define
it allows not change anything in keyinit & key, only -D_SKEY_INTERNAL required.
Staticise some things.
1996-10-17 15:22:46 +00:00
Andrey A. Chernov 590b04e005 If 1) regular Unix passwords not permitted and 2) skey database
for this user not activated, there no correct password exist,
so don't bother ask for it and return "" immediately
1996-10-17 13:43:58 +00:00
Andrey A. Chernov 96b74d637f Make it work in localized environment, replace strftime's %b which can be
in national form with months names table
1996-10-17 12:45:39 +00:00
Peter Wemm 0d4453d303 Corrently null-terminate the path being passed to the opendir() calls,
malloc() does is not defined to return a zeroed buffer leading to
"strange" problems.

Submitted by: Karl Denninger <karl@mcs.com>, PR#1826
1996-10-17 00:40:04 +00:00
Jordan K. Hubbard a0735deb48 Bring back ns_* routines; we need them for ifconfig and route. 1996-10-16 19:38:51 +00:00
Andrey A. Chernov 1642f84deb Save half of space in LC_COLLATE and remove unneded code.
This change is not compatible with previous variant, however proper
error code returned in both cases.
Colldef changes will follows.
1996-10-15 21:53:23 +00:00
Poul-Henning Kamp 139107f0ff A couple of minor nits.
Submitted by:	Craig Leres <leres@ee.lbl.gov>
Submitted by:	Theo Deraadt <deraadt@theos.com>
1996-10-14 08:34:02 +00:00
Jordan K. Hubbard 3643c5565c Send PASV instead of PASSIVE.
Submitted-By: Archie Cobbs <archie@whistle.com>
1996-10-10 08:34:27 +00:00
Garrett Wollman 04422105e3 Use -mdoc macros properly.
Translate from Danglish into English.
Refer to the alogrithms as ``RSA Data Security MDX message digest'' as
required by the license.
1996-10-09 21:00:48 +00:00
Garrett Wollman 318a4f9fc3 Require that a timezone specified via the TZ envariable be a regular
file (and not a directory or a device which might also be readable).
Closes PR#1740.
1996-10-09 17:39:37 +00:00
Andrey A. Chernov 7c99d4740c Add orandom(), osrandom(), etc. 1996-10-09 16:12:38 +00:00
Andrey A. Chernov 40f8b70da6 Improve seeding, the random sequence did not vary match
with the seed. Old variant will be available via libcompat soon.
1996-10-09 15:59:04 +00:00
John Polstra d3281e16c2 Fix an error in the description of "h_errno". Add "const" to a few
declarations to make them agree with the actual prototypes in <netdb.h>.
1996-10-08 22:30:08 +00:00
Bruce Evans 2ee3f0c3fe Yet another attempt to remove the old libraries correctly. libfoo.*
was misnamed foo.*.
1996-10-08 20:06:41 +00:00
Paul Traina 3943f47714 Link shared libraries with -x 1996-10-08 04:37:00 +00:00
Marc G. Fournier d453b6a53d Fixed prototyping of dlopen/dlsym in dlfcn.h, to match how crt0.c defines
it and link.h prototypes it

Error of my ways pointed out by Peter
1996-10-08 01:41:51 +00:00
Peter Wemm 2f85bf6e8e Implement virtual-to-physical address mapping for the kvm library on
dead kernel debugging.  The previous code was a "do nothing".

The most obvious side effect of this is that you can now do things like
this and reasonably expect them to work:
  dmesg -M /var/crash/vmcore.3 -N /var/crash/kernel.3
  ps -axl -M /var/crash/vmcore.3 -N /var/crash/kernel.3

A good deal of this was lifted from the gdb code to do this, as well as
from NetBSD's libkvm (which has completely different VM macros)
1996-10-07 20:17:50 +00:00
Steve Price 3d78e32756 Remove garbage initcode reference so that 'gcc -Dlint ...'
will compile without error.
1996-10-06 03:19:26 +00:00
Wolfram Schneider e83201b43a delete doubled words, e.g.: "the the" -> "the" 1996-10-05 22:27:30 +00:00
Paul Traina beddb20c7a Skip results that have unexpected lengths 1996-10-01 03:45:06 +00:00
Peter Wemm 4e89f352f0 Support crt0 <-> ld.so interface version 4. This should be both backwards
and forwards compatable with version 3.  This is needed to enable storing
a run-time library path in the dynamic linking headers.  The crt startup
tries version 4 first, and falls back to version 3, so an executable that
is linked on -current will work with the ld.so on 2.1.x and less.

Reviewed by: nate, jdp
Obtained from: NetBSD
1996-10-01 00:54:48 +00:00
Wolfram Schneider 4347915c16 perror () does not prepend ": " for the non-NULL argument "". close PR 1492
Submitted by: Kent Vander Velden <graphix@iastate.edu>
Reviewed by:
Submitted by:
Obtained from:
1996-09-30 15:39:18 +00:00
Bruce Evans 38c429d5bc Made this about as (in)complete as sysctl.8.
- removed references to nonexistent pathconf-related variables.
- document everything in CTL_MACHDEP(more than in sysctl.8) and
  80% of the things in CTL_KERN (same as in sysctl.8).
1996-09-29 18:12:52 +00:00
Bruce Evans b027a2a70d Updated the descriptions of the limits related to EAGAIN.
Changed the error name width for rfork to match fork.
1996-09-29 17:47:46 +00:00
Wolfram Schneider ac8ef33789 .Os NetBSD -> .Os FreeBSD.
The pages are not NetBSD specific and FreeBSD is not a child of NetBSD.
1996-09-28 22:46:35 +00:00
Bruce Evans 35ecc2f917 .DV -> .Dv (SOCK_STREAM was invisible). 1996-09-28 13:32:35 +00:00
Bruce Evans 246537139a .DV -> .Dv (FOPEN_MAX was invisible). 1996-09-28 13:18:12 +00:00
Alexander Langer a5ad841d36 Added parens to noecho in screen initialization example. 1996-09-28 11:09:33 +00:00
Bruce Evans b017ff4eb8 Peter must be sick of this, so I changed it directly. Fixed:
- old static non-profiled libraries were removed in the wrong directory
  if ${ORIG_SHLIBDIR} != ${LIBDIR}.
- old profiled libraries weren't removed.
- new shared compat libraries were installed in the wrong directory if
  ${ORIG_SHLIBDIR} != /usr/lib.
- some lines were too long.
Added some comments about cases that have caused problems.  Changed
libfoo to ${LIB} so that libresolv/Makefile and libgnumalloc/Makefile
are almost identical.
1996-09-27 16:22:49 +00:00
Poul-Henning Kamp fab94ac15b Don't use malloc, pessimize to use sbrk.
fix sbrk manpage while we're at it.
1996-09-27 15:34:19 +00:00
Peter Wemm 78a660dc23 Don't rely on LIBDIR having been equal to SHLIBDIR on Bruce's suggestion.
Set ORIG_SHLIBDIR to the expanded value of ${SHLIBDIR}, and use that
as a base to modify the new SHLIBDIR without getting infinite recursion.
1996-09-27 12:10:14 +00:00
Peter Wemm cbce68b013 These were repository copied. 1996-09-27 07:21:11 +00:00
Peter Wemm 92f8a73207 libfakegnumalloc -> libgnumalloc 1996-09-27 07:12:11 +00:00
Peter Wemm 0b4ab99195 Attempt to clean some bogons. I've had so much email with comments,
complaints and suggestions about this over the last few days that I
cannot remember who has said what anymore. :-(

There is also a comment here about the intent of the process and another
explicit pointer to the etc/etc/rc change to that has been ignored by
quite a few people it seems.
1996-09-27 07:02:21 +00:00
Peter Wemm 1516dba3a3 Repository copy libfakegnumalloc to libgnumalloc and remove the symlink
stuff and detection for the "gnumalloc" port which doesn't exist and
nobody has cared enough about for the past 6 months or so to implement.

As has been pointed out to me (quite a few times) in email, the people
that had been bitten by the changes had failed to follow the instructions
about updating /etc/rc.

Bruce also pointed out that after my last commit, it was no longer
removing /usr/lib/libgnumalloc.so.2.0 as it should have been.

Hopefully this (and the comments in the Makefile) should defuse the problem
a bit.
1996-09-27 06:58:05 +00:00
Peter Wemm b2419d6fe2 Remove the nuke of /usr/lib/libgnumalloc*, this is closer to "How It Was
Before", hopefully it won't cause as much hassle.  This now entirely
confines it's activities to /usr/lib/compat/lib{fake,}gnumalloc.so.2.0
1996-09-26 14:22:32 +00:00