Commit Graph

124 Commits

Author SHA1 Message Date
Bruce Evans
c7091c3117 (Ab)use .Vt instead of .Fd for a variable declaration. 1998-03-23 13:05:07 +00:00
Philippe Charnier
a5941fc2aa .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq 1998-03-19 07:34:22 +00:00
John Birrell
0107877e04 Change MACHINE references to MACHINE_ARCH. 1998-02-20 08:23:55 +00:00
John Birrell
4439d165b7 Add #include <string.h> to get prototypes. 1998-02-20 08:13:51 +00:00
Bruce Evans
c7b367098d Fixed #includes in the synopsis and in an example. <sys/socket.h>
isn't a prerequisite, since it isn't required for the prototypes
and isn't always needed to call the functions (the address family
might be a variable).
1998-01-20 11:03:15 +00:00
Warner Losh
3c8e19e155 handle long usernames more carefully
Reviewed by:	guido
Obtained from:	OpenBSD (Theo de Raadt)
1998-01-07 00:28:36 +00:00
Alexander Langer
3b7c07b1f2 Removed unnecessary initialization of hp in gethostbyaddr_r. 1997-12-25 04:21:08 +00:00
Bruce Evans
b966cc2394 Sorted lists. 1997-10-21 08:41:15 +00:00
Bruce Evans
2bc3b4d735 Removed the subdirectory paths from the definitions of MAN[1-9]. They
were a workaround for limitations in bsd.man.mk that were fixed about
2 years ago.
1997-10-15 16:16:41 +00:00
Peter Wemm
9e06e6da51 Some adjustments for the resolver use of poll(). For some reason I thought
an unimplemented syscall returned ENOSYS, rather than EINVAL.  I have run
statically linked code with this wrapper and it does appear to work fine
on 2.2-stable which doesn't have poll().  ktrace shows the poll syscall fail
once and the fallback to select() working.
1997-09-16 06:03:54 +00:00
Peter Wemm
535db1806c Call poll(2) from within the resolver but adapt to older kernels without it
if necessary.  This removes the need to malloc large fd_set's for selecting
on high fd's (larger than FD_SETSIZE at libc compile time).

The syscall adaptive stuff only happens on the very first call.  SIGSYS
is masked, and if the call to poll fails with ENOSYS, then we use select
for the life of the program.  If poll does not fail with ENOSYS, then we
always use poll and skip the once-off signal masking gunk.

This may be overkill, but it saved my neck a few times while working on
multiple different sets of kernel sources, some with poll, some without.
1997-09-14 09:44:34 +00:00
Brian Somers
a367bd9e25 Add "options no_tld_query" to resolv.conf.
Mention the capability in resolver(5).
Mention that RES_OPTIONS can be used in resolver(5).
Discussed with: -hackers
1997-09-01 01:19:23 +00:00
Peter Wemm
65b3003d2d kill the undead 1997-07-13 14:26:00 +00:00
Bruce Evans
362c392f0b This commit was generated by cvs2svn to compensate for changes in r27180,
which included commits to RCS files with non-trunk default branches.
1997-07-03 03:28:27 +00:00
Bruce Evans
5500fdcd4f Import Lite2's src/lib, except for non-i386 machine-dependent directories,
libc/db, libc/gen/crypt.* and libtelnet.  All affected files except 3
unimportant ones have already left the vendor branch.
1997-07-03 03:28:27 +00:00
Peter Wemm
1e7aa4e938 replace the OpenBSD fd_set sizing code with something more efficient.
Only call malloc() if the fd is too big for the compiled in fd_set size,
and don't use calloc either.  This should reduce the impact of conflicts
with private malloc implementations etc.  When using the fd_set on the
stack, only zero what is needed rather than all 1024 bits like FD_ZERO did.
1997-06-28 04:19:52 +00:00
Peter Wemm
d2346017f0 Dynamically size fd_set in select rather than fail if too many files
are open.
Obtained from: OpenBSD; by deraadt and dm
1997-06-27 13:00:51 +00:00
Peter Wemm
fa0913efdb compensate for res_send <-> __res_send changes 1997-06-27 08:35:13 +00:00
Peter Wemm
6c5aff806e Merge in bind-4.9.6 resolver changes. Note that they resolve the
overflow problem differently.
1997-06-27 08:22:03 +00:00
Philippe Charnier
577b61c645 Typo. 1997-06-18 06:26:13 +00:00
Andrey A. Chernov
a14d48e67b Add MAXHOSTNAMELEN check
Obtained from: OpenBSD
1997-06-13 19:21:54 +00:00
John Birrell
870039320f Changed all paths to be relative to src/lib instead of src/lib/libc
so that all these makefiles can be used to build libc_r too.

Added .if ${LIB} == "c" tests to restrict man page builds to libc
to avoid needlessly building them with libc_r too.

Split libc Makefile into Makefile and Makefile.inc to allow the
libc_r Makefile to include Makefile.inc too.
1997-05-03 03:50:06 +00:00
Bruce Evans
1eda21cbb6 Fixed #include and/or prototype bugs in synopsis. 1997-04-13 13:26:42 +00:00
Warner Losh
79d71652cf If we're running setuid/setguid then don't open the host alias file to
prevent information leakage.

Closes PR 2578

Submitted by:	Julian Assange
1997-03-24 06:11:44 +00:00
Bruce Evans
433671e348 Fixed missing #include of <sys/types.h> and wrong arg types in synopsis.
Reviewed by:	wollman
1997-03-19 19:41:20 +00:00
Bruce Evans
3ce29386aa Fixed missing function types in synopsis. 1997-03-19 00:32:42 +00:00
Peter Wemm
beb9f61579 Fix problem with FD_SET* overflow reporting.. Perror() didn't have enough
args, and errno hasn't actually been set so it probably doesn't make sense
to report it via strerror().

Pointed out by: bde
1997-03-12 11:10:54 +00:00
Peter Wemm
9547ea9f3a _res_close() -> res_close()
Pointed out by: bde
1997-03-12 11:02:00 +00:00
Guido van Rooij
1ab96f9344 Check for overflow of FD_SET 1997-03-10 19:32:46 +00:00
Mike Pritchard
6e11b43020 getnetbyaddr now takes an unsigned long as its first argument. 1997-02-28 06:28:53 +00:00
Warner Losh
2a62f02315 Buffer overflow from DNS name information which could cause root access
when called from lpd.

Reviewed by:	jkh, pst
Submitted by:	Oliver Friedrichs <oliver@secnet.com>
1997-02-26 06:12:34 +00:00
Peter Wemm
7e546392b5 Revert $FreeBSD$ to $Id$ 1997-02-22 15:12:41 +00:00
Warner Losh
5480d8d5c2 Fix PR2579: potential security hole in rcmd.c
Submitted by:	Julian Assange
1997-02-09 06:54:46 +00:00
Mike Pritchard
453196eb04 Update to reflect current include files. 1997-01-30 23:10:32 +00:00
Wolfram Schneider
75141cc987 Sort cross references. 1997-01-20 23:23:22 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Andrey A. Chernov
07a7a2c487 Fix fake failures on the short names which looks like hexadecimal numbers
Submitted by: paul@vix.com
1997-01-08 13:06:14 +00:00
Andrey A. Chernov
64cf8d66e2 Disable isxdigit block until proper solution will be found
isxdigit(name[0]) gives false failures on short names which looks
like hexadecimal digits, f.e. "fade", "babe", "d133", etc.
1997-01-05 17:26:09 +00:00
Jordan K. Hubbard
b355f69744 Remove bogus weak reference. 1997-01-01 11:03:44 +00:00
Peter Wemm
8c675e8051 Tempt fate! 'cvs add' a file remotely which also exists in the Attic on
RELENG_2_2!

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

This provides stubs so that binaries linked in 2.2 will run on 3.0
1996-12-30 13:25:38 +00:00
Peter Wemm
ca785773f6 Here goes.. Bring the 4.9.5-P1 resolver into -current. This has the
DNSSEC stuff, among other things.  There are also some renamed functions,
I've left out the res_stubs.c from this commit in case cvs bombs out..
1996-12-30 13:18:48 +00:00
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
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
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
Mike Pritchard
487990280d Correct some xrefs/mlinks. 1996-12-14 23:27:20 +00:00
Joerg Wunsch
b784c223ee Fix the fix.
Pointed out by:	wollman, bde
1996-12-13 13:31:12 +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
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