itojun
9134efabd0
use strlcpy where it is more appropriate.
2002-11-17 01:51:24 +00:00
itojun
095b03757d
pull in changes in http://www.isc.org/products/BIND/patches/bind4910.diff
...
- better error check on __dn_skipname
- more strict reverse lookup handling
2002-11-14 02:14:43 +00:00
itojun
d7ec2d5997
fix remote buffer overrun. from openbsd tree (1997).
2002-11-13 00:21:05 +00:00
thorpej
0e69571cc2
Avoid strict alias warning.
2002-11-11 20:24:38 +00:00
thorpej
de792f2457
Fix signed/unsigned comparison warnings.
2002-11-11 19:49:00 +00:00
thorpej
4747ad6ea7
Fix signed/unsigned comparison warnings.
2002-11-11 19:25:38 +00:00
thorpej
1289029f10
Fix signed/unsigned comparison warnings.
2002-11-11 17:56:11 +00:00
thorpej
585ad39ac1
Fix signed/unsigned comparison warnings. Catch error conditions
...
from snprintf().
2002-11-11 17:10:11 +00:00
thorpej
fd128e9fb6
Fix signed/unsigned comparison warnings.
2002-11-11 16:50:34 +00:00
thorpej
20b98814a9
Fix signed/unsigned comparison warnings.
2002-11-11 01:12:04 +00:00
wiz
091f48096d
writable instead of writeable. By Adrian Mrva.
2002-10-02 10:57:55 +00:00
wiz
3e44f1568a
Correct spelling of "constraints". Noted by Adrian Mrva.
2002-10-02 10:53:50 +00:00
wiz
8f0a2a607c
function with n.
2002-10-02 10:48:35 +00:00
tron
377e179dcb
Use "const" for all input parameters of ethers(3) functions.
2002-09-16 19:25:30 +00:00
wiz
604d7cb2eb
implemented, not implementated; arbitrary, not arbritrary.
2002-09-04 01:07:12 +00:00
onoe
a5fc25f65e
Limit UDP payload size for EDNS0 to 0xffff, not use lower 16bit value.
2002-08-28 02:37:09 +00:00
itojun
006281a1e2
kill register decl
2002-08-27 23:47:07 +00:00
itojun
62f36ff8e2
allocate 64K recieve buffer for DNS responses.
2002-08-27 08:50:49 +00:00
itojun
36e473ebb2
off-by-one. PR 18049
...
correct snprintf() return value handling in another place.
2002-08-23 16:10:42 +00:00
itojun
949583590f
drop AAAA reply with IPv4 mapped address. sync w/kame
...
draft-itojun-v6ops-v4mapped-harmful-00.txt
2002-08-22 16:32:14 +00:00
itojun
4005a5250f
set h_errno properly if internal string manipulation fails.
2002-08-16 21:54:00 +00:00
itojun
44ca8f4da1
use sizeof, avoid duplicated use of MAXDNAME
2002-08-16 13:59:39 +00:00
itojun
1173373b45
be more picky about size arg
2002-08-16 12:23:20 +00:00
itojun
1e1a07972c
lint clean
2002-08-16 12:20:19 +00:00
itojun
bb80ac654a
avoid sprintf. use snprintf with picky error traps.
2002-08-16 12:18:06 +00:00
itojun
0de70db9cd
check for pointer overwrap
2002-08-16 12:10:37 +00:00
itojun
b51bffa186
correct cases with zero in the middle
...
(0x00ff00ff should be "0.255.0.255", not "255.255")
2002-08-16 12:05:01 +00:00
itojun
0b6566bcda
avoid sprintf. use snprintf. simplify cases where 1st arg is 0.
2002-08-16 12:03:41 +00:00
itojun
c6a3499c08
use snprintf. don't duplicate MAXDNAME (use sizeof).
2002-08-16 11:53:19 +00:00
itojun
90a8853f46
use strlcat
2002-08-16 11:49:57 +00:00
itojun
f425242dc9
fix weird indent for comment lines
2002-08-16 11:48:25 +00:00
itojun
c5a4255163
eliminate sprintf. use snprintf.
...
XXX loc_ntoa should be changed to take additional size_t as arg
2002-08-16 11:45:55 +00:00
itojun
5c323232e7
eliminate sprintf, use snprintf. check strlcat error.
2002-08-16 11:30:28 +00:00
itojun
3452fa16c4
be more picky about string buffer manipulation. hints from freebsd
2002-08-16 07:39:44 +00:00
itojun
0cb9a97393
lint clean
2002-08-09 04:29:29 +00:00
itojun
cb4277ff85
unifdef for auditability.
2002-08-09 04:26:07 +00:00
soren
69e08c5b46
Make SYNOPSIS accurate about required headers.
...
Fixes PR lib/11021 from wiz.
2002-08-06 16:08:47 +00:00
itojun
463bfdcd98
use strlcpy where appropriate
2002-08-02 07:50:35 +00:00
itojun
0c0bf329c4
query ip6.arpa then ip6.int for IPv6 reverse lookup. follows RFC3152.
2002-07-29 10:01:58 +00:00
wiz
18c66da5b7
Two typos.
2002-07-18 10:41:17 +00:00
itojun
a4cf77c9bb
pacify lint. from he@netbsd
2002-07-01 22:05:08 +00:00
itojun
754f8759a4
lint clean. from martin husemann
2002-07-01 21:05:56 +00:00
itojun
9922c987a9
make more pedantic check on strtoul. from deraadt, sync w/kame
2002-07-01 07:42:49 +00:00
itojun
28735a6a17
correct port range check. from deraadt, sync w/kame, diff sent to bind-bugs
2002-06-29 12:23:10 +00:00
itojun
0c63dd3cf2
correct %d/%u mixup.
2002-06-27 10:22:07 +00:00
itojun
0c4fb2c7e1
correct DIAGASSERT
2002-06-26 09:39:48 +00:00
itojun
9cdbc86d39
correct bad practice in the code - it uses two changing variables
...
to manage buffer (buf and buflen). we eliminate buflen and use
fixed point (ep) as the ending pointer.
this fix is NOT critical.
2002-06-26 06:00:26 +00:00
itojun
092b3bc66a
avoid remote buffer overrun on hostbuf[]. From: Joost Pol <joost@pine.nl>
...
correct bad practice in the code - it uses two changing variables
to manage buffer (buf and buflen). we eliminate buflen and use
fixed point (ep) as the ending pointer.
this fix is critical.
2002-06-26 06:00:07 +00:00
itojun
fb40d48413
do not pass uninitialized variable to nsdispatch().
2002-06-26 02:40:46 +00:00
itojun
9ed8a29685
refer nsswitch.conf(5). From: Jim Bernard <jbernard@mines.edu>
2002-06-15 21:49:18 +00:00
wiz
e3e4fede44
__STDC__ is always defined on NetBSD.
2002-05-26 14:48:19 +00:00
tron
f2679ef4e3
Revert last change after protoype of getnameinfo(3) has been changed back.
2002-05-22 14:42:37 +00:00
kleink
a24f74d0fd
Turn the flags argument to getnameinfo(3) back into an int (from unsigned
...
int); this is consistent with RFC2553, the current draft-ietf-ipngwg-
rfc2553bis-05 and the majority of deployed implementations.
Also, there is an effort under way to have this changed back to int in
XBD6/XSH6, XNS, and POSIX-2001 TC1.
2002-05-22 09:42:37 +00:00
itojun
6a3445b8a3
be picky about string manipulation in reverse lookups
2002-05-22 02:39:15 +00:00
itojun
b617695b31
use strlcpy, not strcpy
2002-05-22 01:52:24 +00:00
itojun
449d6afcab
style
2002-05-18 00:07:28 +00:00
itojun
c37fca45ce
do not reverse-lookup scoped IPv6 address. it does not make sense as
...
there's no way to give scope identifier. sync w/kame
2002-05-17 22:40:31 +00:00
kleink
3f6b0b61a5
<netdb.h> doesn't need prerequisite headers.
2002-05-15 08:53:42 +00:00
thorpej
2afd826926
Delint after getaddrinfo(), etc. changes.
2002-05-14 23:58:08 +00:00
kleink
ba77dc646c
XNS5.2/POSIX-2001: change the size argument to inet_ntop from size_t to
...
socklen_t.
2002-05-14 18:57:31 +00:00
kleink
4b77e72e94
More XNS5.2/POSIX-2001 alignment: change the flags argument to
...
getnameinfo() from int to unsigned int.
2002-05-14 14:35:36 +00:00
kleink
485febee55
Align with XNS5.2/POSIX-2001: change hostlen and servlen arguments to
...
getnameinfo() from size_t to socklen_t.
2002-05-14 14:31:05 +00:00
kleink
dddf6754e0
ai_addrlen: size_t -> socklen_t.
2002-05-14 13:50:21 +00:00
kleink
06d36d9eee
struct addrinfo.ai_addrlen used to be a size_t, per RFC 2553.
...
In XNS5.2, and subsequently in POSIX-2001 and draft-ietf-ipngwg-rfc2553bis-02
it was changed to a socklen_t.
To accomodate for this while preserving binary compatibility with the
old interface, prepend or append 32 bits of padding, depending on
the (LP64 data model) architecture's endianness.
This should be deleted the next time the libc major number is
incremented.
2002-05-14 13:45:13 +00:00
kleink
4396915999
Rip out <sys/types.h> and <sys/socket.h> inclusions: there are no
...
pre-requisites for <netdb.h>.
2002-05-10 22:26:59 +00:00
kleink
c88f6e9e24
In the examples, initialize struct addrinfo explicitly to either 0 or a
...
NULL pointer; from der Mouse in PR lib/16634.
2002-05-10 22:11:24 +00:00
simonb
fdf099ea04
Remove a check for a u_int8_t variable being greater than 255.
2002-05-05 08:28:47 +00:00
groo
fbac9d8372
botched strncpy -> strlcpy
...
from xs@kittenz.org
2002-04-16 19:17:17 +00:00
groo
1e880d776e
botched strn* -> strl*
...
from xs@kittenz.org
2002-04-16 19:16:22 +00:00
groo
6bf409aa5b
Minor KNF + proper end of string detection in read_config_file()
...
Inspired by xs@kittenz.org
2002-04-16 19:12:40 +00:00
thorpej
9c33b55e7c
Split the notion of building Hesiod, Kerberos, S/key, and YP
...
infrastructure and using that infrastructure in programs.
* MKHESIOD, MKKERBEROS, MKSKEY, and MKYP control building
of the infratsructure (libraries, support programs, etc.)
* USE_HESIOD, USE_KERBEROS, USE_SKEY, and USE_YP control
building of support for using the corresponding API
in various libraries/programs that can use it.
As discussed on tech-toolchain.
2002-03-22 18:10:19 +00:00
lukem
247856f4d7
Fixes from Bill Fenner <fenner@research.att.com> for problems he found
...
in FreeBSD's port of this nsswitch code:
- Don't ignore unknown characters. The old lexer would treat
hosts:!!!!!!!!@@@@@$%^&*()()*$(files{}{}|||++!)(dns
exactly the same as
hosts: files dns
- Recover from errors by looking for the end of a line. This means
that having a syntax error near the top of the file doesn't prevent
a service at the bottom of the file with no syntax error from being
looked up.
Thanks Bill!
2002-03-19 00:04:09 +00:00
sommerfeld
3e18fc136f
More ipip references
2002-03-04 15:15:39 +00:00
augustss
8f814a0ad6
Make this lintable so we can build libc again.
2002-02-14 22:10:56 +00:00
martin
63ad589924
Fix a LP64 problem. Patch from Minoura Makoto in PR lib/15596.
2002-02-14 19:53:00 +00:00
ross
9856438e91
generate & symbolically
2002-02-07 09:24:04 +00:00
ross
814f296b77
Generate <>& symbolically.
2002-02-07 07:00:09 +00:00
lukem
4d32f2f102
- be consistent about using "u_char" instead of "unsigned char"
...
- delint
2001-12-09 01:17:36 +00:00
lukem
686d221d91
Implement AF_INET6 back-ends for inet_net_ntop() and inet_net_pton(), from
...
the BIND 8.3.0-T2A sources. Thanks to Paul Vixie for the pointer to it.
2001-12-08 12:06:12 +00:00
lukem
32a96141e4
ansi knf
2001-12-08 11:47:04 +00:00
gmcgarry
d28c8e0f2a
Add .Os
2001-12-08 04:52:01 +00:00
lukem
d62c475930
ansi knf. remove unused cruft
2001-12-01 04:43:24 +00:00
ross
28e17cffb8
Delete the old BUGS section entry:
...
> On the VAX bytes are handled backwards from most everyone else in
> the world. This is not expected to be fixed in the near future.
Multiple levels of irony there...
2001-11-29 22:55:57 +00:00
itojun
3c0303a158
sync with reality; scope identifier comes with the result even without
...
NI_WITHSCOPEID.
2001-11-15 06:46:33 +00:00
itojun
6c9440f374
make NI_WITHSCOPEID a default (always on), to synchronize with recent 2553bis.
...
sync with kame.
2001-11-15 04:49:01 +00:00
itojun
72a8eddd96
synchronize with kame better. get rid of #defines for ENI_xx.
2001-11-15 04:38:32 +00:00
lukem
50f5afd52e
fix WARNS=2 (-Wshadow) warnings
2001-11-04 13:57:29 +00:00
wiz
2a5b4efdf5
sort sections
2001-10-22 23:47:01 +00:00
kleink
bec52f0825
Add a reference to recv(2) as well.
2001-10-22 22:29:39 +00:00
kleink
d4c0d0f2a2
Add a sockatmark(3), the 1003.1g wrapper around SIOCATMARK.
2001-10-22 17:53:43 +00:00
bjh21
b12979794e
Put back AF_LINK support. This time, all the new code passes lint(1), modulo
...
bin/14175. It should pass lint on a native i386 build, but I can't test that.
2001-10-06 13:59:41 +00:00
bjh21
5a7a518e05
Remove AF_LINK support. It generates lint warnings, and hence won't compile
...
on i386. I'll re-commit once I've understood and fixed the problems.
2001-10-05 20:51:19 +00:00
itojun
84bfe490e4
make it at least compile (there's no /usr/include/net/if_ieee1394.h exist).
...
avoid overrun with snprintf. be careful about snprintf return value.
2001-10-05 01:39:38 +00:00
bjh21
5b533f601d
Extend getnameinfo() to support AF_LINK sockaddrs. The intention is that
...
anything that wants to print a link-layer address should go through here,
rather than re-inventing the wheel.
2001-10-04 23:09:04 +00:00
wiz
cb19ecf339
Actually, we don't have libhesiod -- the functions are in libc.
...
Noted by Gregory McGarry.
2001-10-04 11:27:19 +00:00
wiz
104fe43050
mdoc'ify.
2001-09-16 15:53:03 +00:00
wiz
97ff145f62
Sort sections, sort SEE ALSO, and misc. fixes.
2001-09-16 02:54:17 +00:00
wiz
e7560d5642
Boring whitespace fixes.
2001-09-16 02:23:09 +00:00
itojun
5996ba4042
make it possible to turn on RES_INSECURE[12] with /etc/resolv.conf.
...
don't connect datagram socket if RES_INSECURE1.
needed to implement IPv6 anycast UDP DNS queries as documented in
<draft-ietf-ipngwg-dns-discovery-02.txt>.
sync with kame.
2001-09-13 11:05:02 +00:00
itojun
9fe945f2fe
sync argument/return type of [hn]to[nh][ls] to XNET 5.2 (uint{16,32}_t).
...
as discussed on tech-net.
2001-08-22 07:42:07 +00:00
itojun
cba884a178
cope with sa_len < sizeof(struct sockaddr).
...
From: Patrik Lindergren <patrik@datacom.nu>
sync with kame
2001-08-20 02:33:49 +00:00
itojun
6cc1136ae1
use snprintf, not sprintf. sync with kame.
2001-08-20 02:33:31 +00:00
itojun
511e898dc2
snprintf return value audit. inspired by deraadt
2001-08-19 01:37:39 +00:00
itojun
908c009e33
there's no host.conf in netbsd. pointed out by smb
2001-08-05 18:09:03 +00:00
itojun
879d773221
make sure we do not touch *pp outside of parts[4].
2001-07-22 15:16:18 +00:00
jdolecek
505574ea9b
remove trailing whitespace
2001-07-08 20:18:36 +00:00
jdolecek
0bab4db966
Change ns_addr() to allocate 'addr' on stack, rather than using a global -
...
we don't need a global variable here.
2001-06-25 09:07:08 +00:00
jdolecek
40a434c929
Fix fallout from variable string format audit, so that this works again.
2001-06-17 23:24:22 +00:00
wiz
40ac848024
Fix various misspellings of compatible/compatibility.
2001-06-11 01:50:48 +00:00
itojun
e007813605
remove obsolete MAN lines for getipnodeby* (has been comented out)
2001-04-29 04:33:54 +00:00
itojun
c19c7735af
copy-paste mistake; s/getaddrinfo/getnameinfo/
2001-04-29 04:32:26 +00:00
kleink
a51e2828bb
Fix previous rev. the right way, using socklen_t.
2001-04-26 19:43:53 +00:00
tron
d83ea5d25d
Fix lint problem caused by the changes for PR standards/12703.
2001-04-26 18:50:13 +00:00
kleink
91491e8dda
Change the `len' arguemtn to gethostbyaddr(3) from int to socklen_t in
...
accordance with XNS5.2; fixes PR standards/12703.
2001-04-26 12:55:31 +00:00
wiz
7742cb260f
Fix date.
2001-04-10 15:20:18 +00:00
itojun
dea3f7103b
it seems that gethostent(3) is no longer supplied in libc.
...
couple of wording corrections.
From: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
2001-02-28 02:30:31 +00:00
sommerfeld
37a3c0e7bc
Replace strcpy with strlcpy and bounds check.
...
From mheffner@vt.edu via freebsd-audit@freebsd.org via hesiod@mit.edu
2001-02-13 15:41:18 +00:00
itojun
a20390114e
fix listener side example. from deraadt, sync with kame
2001-02-12 09:28:40 +00:00
itojun
f7d72dde3e
use standard IPv6 address comparison macros. sync with kame
2001-02-12 09:27:46 +00:00
itojun
34cabf50d6
- scope separater is percentage, not atmark.
...
- typo in example. s/err1/errx/.
- some wording improvements.
sync with kame.
2001-01-26 13:30:38 +00:00
jdolecek
ca797c3c15
make local constant arrays const
2001-01-25 22:50:55 +00:00
itojun
2dda99193c
make sure "qname" argument to getanswer() is properly given. from lukem
2001-01-24 15:05:48 +00:00
itojun
c0ed349e69
do not refer getnodebyaddr.
...
sync with latest kame.
2001-01-05 13:40:28 +00:00
lukem
1e96402257
ensure that buf1 in res_queriesmatch() isn't dereferenced before
...
testing with _DIAGASSERT(buf1 != NULL).
(damn those pesky initialisations in declarations... :)
2001-01-04 15:04:19 +00:00
lukem
a976c8e346
sprinkle _DIAGASSERT() around
2001-01-04 03:56:17 +00:00
christos
663f790f35
remove redundant declarations.
2000-12-20 20:51:08 +00:00
christos
d76f22c50c
add _nsyylineno declaration
2000-12-20 20:50:46 +00:00
christos
413f6305c4
remove unnecessary prototypes
...
lint casting.
2000-12-20 20:44:14 +00:00
christos
02db12eb31
appease lint casting.
2000-12-20 18:47:11 +00:00
christos
39b08b8fe0
remove redundant declarations of h_errno and __hostalias
2000-12-10 04:19:53 +00:00
itojun
1bc25f5914
strictly conform to RFC2553 (specifically ENXIO case). sync with KAME
2000-11-24 08:21:12 +00:00
lukem
73842568e7
english fixup
2000-11-16 07:25:36 +00:00
lukem
afc75b9e6d
Don't getenv $HESIOD_CONFIG or $HES_DOMAIN if issetugid().
...
Initial problem noted by Danny Braniss <danny@cs.huji.ac.il>
via Jacques A. Vidrine <n@nectar.com>
2000-10-31 12:47:21 +00:00
itojun
bcab9b6601
define HAVE_IFM_ADDRS for non-bsdi. sync with kame
2000-10-27 15:48:49 +00:00
ad
5b09090e8e
insure -> ensure
2000-10-05 12:35:33 +00:00
sommerfeld
4c38fc5aac
Varargsify dprintf to allow for format string checking
2000-10-04 14:56:24 +00:00
sommerfeld
76a009b2be
Avoid compile-time variable format string (format audit)
2000-10-04 14:52:27 +00:00
sommerfeld
ae42ec1652
Avoid run-time construction of format string we can build at compile time
2000-10-04 14:46:23 +00:00
itojun
9ebff4b328
remove merge error from kame.
2000-09-25 23:37:55 +00:00
itojun
a931ac8209
off-by-1 error in string length validation.
...
From: Pavel Kankovsky <peak@argo.troja.mff.cuni.cz>
2000-09-25 23:07:28 +00:00
lukem
4a1b4395d7
don't bother declaring in6_addrany[] and in6_loopback #ifndef INET6
2000-09-23 04:40:19 +00:00
ad
82759dbdf5
Use .{B,Bs,F,N,O}x and fix miscellaneous errors.
2000-09-21 10:43:49 +00:00
itojun
e871d0cd31
on /etc/hosts lookup, set "official host name" (the leftmost hostname)
...
into ai_canonname. this is to synchronize with practice in gethostby*.
comment from ume@mahoroba.org . sync with kame.
2000-08-31 17:32:39 +00:00
itojun
14fcd6ed41
mention that current get{addr,name}info implementation are not thread-safe.
...
(sync with kame)
From: Greg Thompson
2000-08-09 22:52:49 +00:00
itojun
babc498cc8
implement EDNS0 support, as EDNS0 support will be made mandatory for
...
IPv6 transport-ready resolvers/DNS servers. need careful configuration
when enable it. (default config is not affected).
see manpage for details.
XXX visible symbol __res_opt() is added, however, it is not supposed to be
called from outside, libc minor is not bumped.
2000-08-09 14:40:52 +00:00
itojun
6acd1fa341
sync comment with reality. from kame
2000-08-07 16:18:45 +00:00
itojun
698d9a8d8b
on gethostby* with NIS backend, make a lookup against ipnodes.{byname,byaddr}
...
for non-IPv4 address. obeys solaris8 practice.
XXX does not support scoped address extension, as gethostby* are not
scope-aware. always use getaddrinfo/getnameinfo.
XXX it is not very useful at this moment, if you define multiple entries for
single hostname. see PR 10713 for detail.
2000-07-30 03:01:01 +00:00
itojun
31089a149f
plug host_addrs overrun. rogue NIS server can transmit tons of lines,
...
effectively overrun host_addrs buffer.
2000-07-30 02:44:36 +00:00
itojun
c8c092ff17
do not try to transmit UDP DNS query forever, in EINTR-busy situation.
...
the change uses extra variables which can be avoided,
it is to make the change look similar to BIND8 change.
question: timeout resolution is 1 second (time_t). should we use
timevals instead?
PR 6410 From: maximum entropy <entropy@venom.bernstein.com>
2000-07-27 00:35:02 +00:00
itojun
3f0f0ab67d
typo. s/Fa getaddrinfo/Fn getaddrinfo/. sync with kame.
2000-07-25 04:51:27 +00:00