Commit Graph

139 Commits

Author SHA1 Message Date
alex
95c394b70e Removed occurrences of consecutive repeated words (such as "the the"). 1999-02-12 02:12:08 +00:00
gallatin
bd8ffb71c5 gethostbyname2() was broken for lookups via NIS on FreeBSD/alpha
due to _gethostbynis() setting h.h_length to sizeof(u_long), which
works out to 8 on alphas.  And 8!= NS_INADDRSZ.
1999-01-25 03:26:45 +00:00
dfr
46dbddcd3c 64bit portability fixes.
Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-10-05 18:35:04 +00:00
imp
ae94780f2c o use strncpy safely
o Only allow options and domain name to be set when we aren't running
  setuid.

Obtained from: OpenBSD
1998-09-14 21:13:06 +00:00
jdp
bf8ea8d3a7 Implement the weak aliases for private entry points in the inet_*
and res_* modules in a way that works for ELF.  I moved the aliases
out of res_stubs.c and into the individual modules where the entry
points are defined.  Weak aliases don't work in ELF unless that is
the case.  (Actually, I'm surprised it worked for a.out.)

This should fix the undefined "inet_addr" and related symbols in
various applications that fail to include <arpa/inet.h> or
<resolv.h> as they are supposed to do.
1998-09-02 00:53:17 +00:00
bde
cfef94c8ca Fixed bitrot in prototypes in synopsis. 1998-08-03 17:52:27 +00:00
bde
53e5892174 Fixed printf format errors. 1998-06-30 17:30:22 +00:00
peter
7321b44b39 Don't compile in the use of poll() when building libc_r. This isn't
so much a "fix", rather a bandaid to buy time to fix it properly
within the thread engine.
1998-06-14 11:25:46 +00:00
peter
9492d9f3a2 Update the resolver parts to bind-8.1.2 level. I have not touched the
getXXXXbyYYYY() interfaces yet.

Obtained from: diff relative to bind-8.1.2 sources
1998-06-11 09:03:02 +00:00
jkoshy
0d7d76d982 Spelling corrections.
PR: 6868
Submitted by: Josh Gilliam <josh@quick.net>
1998-06-06 05:50:53 +00:00
peter
da6a2015e3 Resolve some unexpected differences when comparing with the 2.2 version.
One bug was relatively harmless (select's timeout had an uninitialized
tv_usec), the other I'm not so sure.. (neglected to catch select returns
less than zero).  Both of these were irrelevant on kernels with poll().
1998-05-02 15:51:54 +00:00
peter
119bf19557 Update libc dns code to 4.9.7-T1B level. This involved chopping out large
chunks of res_comp.c and replacing it with chunks of bind-8.1.1's resolver
code.  (There are no interface changes though)
The other parts are better bounds checking related.
1998-05-02 13:11:02 +00:00
bde
57517b42e5 (Ab)use .Vt instead of .Fd for a variable declaration. 1998-03-23 13:05:07 +00:00
charnier
79fc0e5555 .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq 1998-03-19 07:34:22 +00:00
jb
bdf0841be6 Change MACHINE references to MACHINE_ARCH. 1998-02-20 08:23:55 +00:00
jb
5860dff332 Add #include <string.h> to get prototypes. 1998-02-20 08:13:51 +00:00
bde
69cc484699 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
imp
c15aab9144 handle long usernames more carefully
Reviewed by:	guido
Obtained from:	OpenBSD (Theo de Raadt)
1998-01-07 00:28:36 +00:00
alex
32ddc95d90 Removed unnecessary initialization of hp in gethostbyaddr_r. 1997-12-25 04:21:08 +00:00
bde
ea35ce8d73 Sorted lists. 1997-10-21 08:41:15 +00:00
bde
ef5c98dd45 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
d9fa5d1fa2 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
ef7710b201 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
a059b2e7c8 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
486333fcfd kill the undead 1997-07-13 14:26:00 +00:00
bde
c800b77e17 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
bde
e2f0a0f35c 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
0e9bc07672 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
f2163cb4a1 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
6d60ffd86a compensate for res_send <-> __res_send changes 1997-06-27 08:35:13 +00:00
peter
63d61ea6e9 Merge in bind-4.9.6 resolver changes. Note that they resolve the
overflow problem differently.
1997-06-27 08:22:03 +00:00
charnier
59c6ef884a Typo. 1997-06-18 06:26:13 +00:00
ache
ea356bff53 Add MAXHOSTNAMELEN check
Obtained from: OpenBSD
1997-06-13 19:21:54 +00:00
jb
a1337bb0ae 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
bde
f4efda881f Fixed #include and/or prototype bugs in synopsis. 1997-04-13 13:26:42 +00:00
imp
ff12c038ef 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
bde
0e6987f95b Fixed missing #include of <sys/types.h> and wrong arg types in synopsis.
Reviewed by:	wollman
1997-03-19 19:41:20 +00:00
bde
3d67153315 Fixed missing function types in synopsis. 1997-03-19 00:32:42 +00:00
peter
214d331cf7 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
9e8bec9430 _res_close() -> res_close()
Pointed out by: bde
1997-03-12 11:02:00 +00:00
guido
39c96d6474 Check for overflow of FD_SET 1997-03-10 19:32:46 +00:00
mpp
b0a4a0ba48 getnetbyaddr now takes an unsigned long as its first argument. 1997-02-28 06:28:53 +00:00
imp
00bfe049f9 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
6b08958c64 Revert $FreeBSD$ to $Id$ 1997-02-22 15:12:41 +00:00
imp
b0afeca2e2 Fix PR2579: potential security hole in rcmd.c
Submitted by:	Julian Assange
1997-02-09 06:54:46 +00:00
mpp
0037fcc3a0 Update to reflect current include files. 1997-01-30 23:10:32 +00:00
wosch
6d0dbd7455 Sort cross references. 1997-01-20 23:23:22 +00:00
jkh
808a36ef65 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
ache
bf70ac7d48 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
ache
17cdaa2f54 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