diff options
author | David Hankins <dhankins@isc.org> | 2005-03-17 20:15:29 +0000 |
---|---|---|
committer | David Hankins <dhankins@isc.org> | 2005-03-17 20:15:29 +0000 |
commit | 98311e4ba99c21b71079481caccdd5a977f22c78 (patch) | |
tree | ed84e5ed5556d5f447ef9ef8417a62275ed443cf /minires | |
parent | c570dfe68e7144bf6565b5d94121bd26d8f9f004 (diff) | |
download | isc-dhcp-98311e4ba99c21b71079481caccdd5a977f22c78.tar.gz |
MASSIVE merge from V3-RELEASE-BRANCH into HEAD. HEAD and V3-RELEASE are
now synced as of tag V3-0-3-BETA-1.
Diffstat (limited to 'minires')
-rw-r--r-- | minires/Makefile.dist | 30 | ||||
-rw-r--r-- | minires/ns_date.c | 26 | ||||
-rw-r--r-- | minires/ns_name.c | 30 | ||||
-rw-r--r-- | minires/ns_parse.c | 84 | ||||
-rw-r--r-- | minires/ns_samedomain.c | 28 | ||||
-rw-r--r-- | minires/ns_sign.c | 32 | ||||
-rw-r--r-- | minires/ns_verify.c | 43 | ||||
-rw-r--r-- | minires/res_comp.c | 26 | ||||
-rw-r--r-- | minires/res_findzonecut.c | 28 | ||||
-rw-r--r-- | minires/res_init.c | 26 | ||||
-rw-r--r-- | minires/res_mkquery.c | 26 | ||||
-rw-r--r-- | minires/res_mkupdate.c | 125 | ||||
-rw-r--r-- | minires/res_query.c | 26 | ||||
-rw-r--r-- | minires/res_send.c | 28 | ||||
-rw-r--r-- | minires/res_sendsigned.c | 23 | ||||
-rw-r--r-- | minires/res_update.c | 26 |
16 files changed, 381 insertions, 226 deletions
diff --git a/minires/Makefile.dist b/minires/Makefile.dist index b6bf0889..59dabf33 100644 --- a/minires/Makefile.dist +++ b/minires/Makefile.dist @@ -1,21 +1,25 @@ # Makefile.dist # -# Copyright (c) 1996-2000 Internet Software Consortium. -# Use is subject to license terms which appear in the file named -# ISC-LICENSE that should have accompanied this file when you -# received it. If a file named ISC-LICENSE did not accompany this -# file, or you are not sure the one you have is correct, you may -# obtain an applicable copy of the license at: +# Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") +# Copyright (c) 1996-2003 by Internet Software Consortium # -# http://www.isc.org/isc-license-1.0.html. +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. # -# This file is part of the ISC DHCP distribution. The documentation -# associated with this file is listed in the file DOCUMENTATION, -# included in the top-level directory of this release. -# -# Support and other services are available for ISC products - see -# http://www.isc.org for more information. +# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # +# Internet Systems Consortium, Inc. +# 950 Charter Street +# Redwood City, CA 94063 +# <info@isc.org> +# http://www.isc.org/ CATMANPAGES = dhcpctl.cat3 SEDMANPAGES = dhcpctl.man3 diff --git a/minires/ns_date.c b/minires/ns_date.c index f5ef8c4c..5f3cb6cb 100644 --- a/minires/ns_date.c +++ b/minires/ns_date.c @@ -1,22 +1,28 @@ /* - * Copyright (c) 1999 by Internet Software Consortium. + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1999-2003 by Internet Software Consortium * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE - * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Internet Systems Consortium, Inc. + * 950 Charter Street + * Redwood City, CA 94063 + * <info@isc.org> + * http://www.isc.org/ */ #ifndef lint -static const char rcsid[] = "$Id: ns_date.c,v 1.2 2000/04/11 01:58:39 mellon Exp $"; +static const char rcsid[] = "$Id: ns_date.c,v 1.3 2005/03/17 20:15:17 dhankins Exp $"; #endif /* Import. */ diff --git a/minires/ns_name.c b/minires/ns_name.c index e815d245..65788753 100644 --- a/minires/ns_name.c +++ b/minires/ns_name.c @@ -1,22 +1,28 @@ /* - * Copyright (c) 1996,1999 by Internet Software Consortium. + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1996-2003 by Internet Software Consortium * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE - * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Internet Systems Consortium, Inc. + * 950 Charter Street + * Redwood City, CA 94063 + * <info@isc.org> + * http://www.isc.org/ */ #ifndef lint -static const char rcsid[] = "$Id: ns_name.c,v 1.1 2000/02/02 07:28:14 mellon Exp $"; +static const char rcsid[] = "$Id: ns_name.c,v 1.2 2005/03/17 20:15:17 dhankins Exp $"; #endif #include <sys/types.h> @@ -255,6 +261,10 @@ ns_name_ntol(const u_char *src, u_char *dst, size_t dstsiz) { dn = dst; eom = dst + dstsiz; + if (dn >= eom) { + errno = EMSGSIZE; + return (-1); + } while ((n = *cp++) != 0) { if ((n & NS_CMPRSFLGS) != 0) { /* Some kind of compression pointer. */ diff --git a/minires/ns_parse.c b/minires/ns_parse.c index 27b06a1a..2854092f 100644 --- a/minires/ns_parse.c +++ b/minires/ns_parse.c @@ -1,22 +1,28 @@ /* - * Copyright (c) 1996,1999 by Internet Software Consortium. + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1996-2003 by Internet Software Consortium * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE - * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Internet Systems Consortium, Inc. + * 950 Charter Street + * Redwood City, CA 94063 + * <info@isc.org> + * http://www.isc.org/ */ #ifndef lint -static const char rcsid[] = "$Id: ns_parse.c,v 1.2 2001/01/16 22:33:08 mellon Exp $"; +static const char rcsid[] = "$Id: ns_parse.c,v 1.3 2005/03/17 20:15:17 dhankins Exp $"; #endif /* Import. */ @@ -38,8 +44,6 @@ static void setsection(ns_msg *msg, ns_sect sect); /* Macros. */ -#define RETERR(err) do { errno = (err); return (-1); } while (0) - /* Public. */ /* These need to be in the same order as the nres.h:ns_flag enum. */ @@ -62,8 +66,9 @@ struct _ns_flagdata _ns_flagdata[16] = { { 0x0000, 0 }, /* expansion (6/6). */ }; -int -ns_skiprr(const u_char *ptr, const u_char *eom, ns_sect section, int count) { +isc_result_t +ns_skiprr(const u_char *ptr, const u_char *eom, ns_sect section, int count, + int *rc) { const u_char *optr = ptr; for ((void)NULL; count > 0; count--) { @@ -71,11 +76,11 @@ ns_skiprr(const u_char *ptr, const u_char *eom, ns_sect section, int count) { b = dn_skipname(ptr, eom); if (b < 0) - RETERR(EMSGSIZE); + return ISC_R_INCOMPLETE; ptr += b/*Name*/ + NS_INT16SZ/*Type*/ + NS_INT16SZ/*Class*/; if (section != ns_s_qd) { if (ptr + NS_INT32SZ + NS_INT16SZ > eom) - RETERR(EMSGSIZE); + return ISC_R_INCOMPLETE; ptr += NS_INT32SZ/*TTL*/; rdlength = getUShort(ptr); ptr += 2; @@ -83,11 +88,13 @@ ns_skiprr(const u_char *ptr, const u_char *eom, ns_sect section, int count) { } } if (ptr > eom) - RETERR(EMSGSIZE); - return (ptr - optr); + return ISC_R_INCOMPLETE; + if (rc) + *rc = ptr - optr; + return ISC_R_SUCCESS; } -int +isc_result_t ns_initparse(const u_char *msg, unsigned msglen, ns_msg *handle) { const u_char *eom = msg + msglen; int i; @@ -96,16 +103,16 @@ ns_initparse(const u_char *msg, unsigned msglen, ns_msg *handle) { handle->_msg = msg; handle->_eom = eom; if (msg + NS_INT16SZ > eom) - RETERR(EMSGSIZE); + return ISC_R_INCOMPLETE; handle->_id = getUShort (msg); msg += 2; if (msg + NS_INT16SZ > eom) - RETERR(EMSGSIZE); + return ISC_R_INCOMPLETE; handle->_flags = getUShort (msg); msg += 2; for (i = 0; i < ns_s_max; i++) { if (msg + NS_INT16SZ > eom) - RETERR(EMSGSIZE); + return ISC_R_INCOMPLETE; handle->_counts[i] = getUShort (msg); msg += 2; } @@ -113,23 +120,26 @@ ns_initparse(const u_char *msg, unsigned msglen, ns_msg *handle) { if (handle->_counts[i] == 0) handle->_sections[i] = NULL; else { - int b = ns_skiprr(msg, eom, (ns_sect)i, - handle->_counts[i]); + int b; + isc_result_t status = + ns_skiprr(msg, eom, (ns_sect)i, + handle->_counts[i], &b); - if (b < 0) - return (-1); + if (status != ISC_R_SUCCESS) + return STATUS; handle->_sections[i] = msg; msg += b; } if (msg != eom) - RETERR(EMSGSIZE); + return ISC_R_INCOMPLETE; setsection(handle, ns_s_max); - return (0); + return ISC_R_SUCCESS; } isc_result_t ns_parserr(ns_msg *handle, ns_sect section, int rrnum, ns_rr *rr) { int b; + isc_result_t status; /* Make section right. */ if (section < 0 || section >= ns_s_max) @@ -141,15 +151,15 @@ ns_parserr(ns_msg *handle, ns_sect section, int rrnum, ns_rr *rr) { if (rrnum == -1) rrnum = handle->_rrnum; if (rrnum < 0 || rrnum >= handle->_counts[(int)section]) - RETERR(ENODEV); + return ISC_R_UNKNOWNATTRIBUTE; if (rrnum < handle->_rrnum) setsection(handle, section); if (rrnum > handle->_rrnum) { - b = ns_skiprr(handle->_ptr, handle->_eom, section, - rrnum - handle->_rrnum); + status = ns_skiprr(handle->_ptr, handle->_eom, section, + rrnum - handle->_rrnum, &b); - if (b < 0) - return (-1); + if (status != ISC_R_SUCCESS) + return status; handle->_ptr += b; handle->_rrnum = rrnum; } @@ -158,10 +168,10 @@ ns_parserr(ns_msg *handle, ns_sect section, int rrnum, ns_rr *rr) { b = dn_expand(handle->_msg, handle->_eom, handle->_ptr, rr->name, NS_MAXDNAME); if (b < 0) - return (-1); + return ISC_R_FORMERR; handle->_ptr += b; if (handle->_ptr + NS_INT16SZ + NS_INT16SZ > handle->_eom) - return ISC_R_NOSPACE; + return ISC_R_INCOMPLETE; rr->type = getUShort (handle->_ptr); handle -> _ptr += 2; rr->rr_class = getUShort (handle->_ptr); @@ -172,13 +182,13 @@ ns_parserr(ns_msg *handle, ns_sect section, int rrnum, ns_rr *rr) { rr->rdata = NULL; } else { if (handle->_ptr + NS_INT32SZ + NS_INT16SZ > handle->_eom) - return ISC_R_NOSPACE; + return ISC_R_INCOMPLETE; rr->ttl = getULong (handle->_ptr); handle -> _ptr += 4; rr->rdlength = getUShort (handle->_ptr); handle -> _ptr += 2; if (handle->_ptr + rr->rdlength > handle->_eom) - return ISC_R_NOSPACE; + return ISC_R_INCOMPLETE; rr->rdata = handle->_ptr; handle->_ptr += rr->rdlength; } diff --git a/minires/ns_samedomain.c b/minires/ns_samedomain.c index ac17a523..bdc6ccad 100644 --- a/minires/ns_samedomain.c +++ b/minires/ns_samedomain.c @@ -1,22 +1,28 @@ /* - * Copyright (c) 1995,1999 by Internet Software Consortium. + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1995-2003 by Internet Software Consortium * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE - * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Internet Systems Consortium, Inc. + * 950 Charter Street + * Redwood City, CA 94063 + * <info@isc.org> + * http://www.isc.org/ */ #ifndef lint -static const char rcsid[] = "$Id: ns_samedomain.c,v 1.3 2001/01/16 22:33:09 mellon Exp $"; +static const char rcsid[] = "$Id: ns_samedomain.c,v 1.4 2005/03/17 20:15:18 dhankins Exp $"; #endif #include <sys/types.h> @@ -168,7 +174,7 @@ ns_makecanon(const char *src, char *dst, size_t dstsize) { size_t n = strlen(src); if (n + sizeof "." > dstsize) { - ISC_R_NOSPACE; + return ISC_R_NOSPACE; } strcpy(dst, src); while (n > 0 && dst[n - 1] == '.') /* Ends in "." */ diff --git a/minires/ns_sign.c b/minires/ns_sign.c index 1137302a..7ce9999a 100644 --- a/minires/ns_sign.c +++ b/minires/ns_sign.c @@ -1,22 +1,28 @@ /* - * Copyright (c) 1999-2001 by Internet Software Consortium, Inc. + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1999-2003 by Internet Software Consortium * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE - * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Internet Systems Consortium, Inc. + * 950 Charter Street + * Redwood City, CA 94063 + * <info@isc.org> + * http://www.isc.org/ */ #ifndef lint -static const char rcsid[] = "$Id: ns_sign.c,v 1.5 2001/06/27 00:30:32 mellon Exp $"; +static const char rcsid[] = "$Id: ns_sign.c,v 1.6 2005/03/17 20:15:18 dhankins Exp $"; #endif #if defined (TRACING) @@ -87,7 +93,7 @@ ns_sign(u_char *msg, unsigned *msglen, unsigned msgsize, int error, void *k, dst_init(); if (msg == NULL || msglen == NULL || sig == NULL || siglen == NULL) - ISC_R_INVALIDARG; + return ISC_R_INVALIDARG; /* Name. */ if (key != NULL && error != ns_r_badsig && error != ns_r_badkey) @@ -118,7 +124,7 @@ ns_sign(u_char *msg, unsigned *msglen, unsigned msgsize, int error, void *k, else n = dn_comp("", cp, (unsigned)(eob - cp), NULL, NULL); if (n < 0) - ISC_R_NOSPACE; + return ISC_R_NOSPACE; alg = cp; cp += n; @@ -190,7 +196,7 @@ ns_sign(u_char *msg, unsigned *msglen, unsigned msgsize, int error, void *k, n = dst_sign_data(SIG_MODE_FINAL, key, &ctx, NULL, 0, sig, *siglen); if (n < 0) - ISC_R_BADKEY; + return ISC_R_BADKEY; *siglen = n; } else *siglen = 0; diff --git a/minires/ns_verify.c b/minires/ns_verify.c index 4ebca7cf..7cf8a5f0 100644 --- a/minires/ns_verify.c +++ b/minires/ns_verify.c @@ -1,22 +1,28 @@ /* - * Copyright (c) 1999-2001 by Internet Software Consortium, Inc. + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1999-2003 by Internet Software Consortium * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE - * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Internet Systems Consortium, Inc. + * 950 Charter Street + * Redwood City, CA 94063 + * <info@isc.org> + * http://www.isc.org/ */ #ifndef lint -static const char rcsid[] = "$Id: ns_verify.c,v 1.6 2001/06/27 00:30:33 mellon Exp $"; +static const char rcsid[] = "$Id: ns_verify.c,v 1.7 2005/03/17 20:15:18 dhankins Exp $"; #endif #define time(x) trace_mr_time (x) @@ -60,6 +66,7 @@ ns_find_tsig(u_char *msg, u_char *eom) { HEADER *hp = (HEADER *)msg; int n, type; u_char *cp = msg, *start; + isc_result_t status; if (msg == NULL || eom == NULL || msg > eom) return (NULL); @@ -72,23 +79,23 @@ ns_find_tsig(u_char *msg, u_char *eom) { cp += HFIXEDSZ; - n = ns_skiprr(cp, eom, ns_s_qd, ntohs(hp->qdcount)); - if (n < 0) + status = ns_skiprr(cp, eom, ns_s_qd, ntohs(hp->qdcount), &n); + if (status != ISC_R_SUCCESS) return (NULL); cp += n; - n = ns_skiprr(cp, eom, ns_s_an, ntohs(hp->ancount)); - if (n < 0) + status = ns_skiprr(cp, eom, ns_s_an, ntohs(hp->ancount), &n); + if (status != ISC_R_SUCCESS) return (NULL); cp += n; - n = ns_skiprr(cp, eom, ns_s_ns, ntohs(hp->nscount)); - if (n < 0) + status = ns_skiprr(cp, eom, ns_s_ns, ntohs(hp->nscount), &n); + if (status != ISC_R_SUCCESS) return (NULL); cp += n; - n = ns_skiprr(cp, eom, ns_s_ar, ntohs(hp->arcount) - 1); - if (n < 0) + status = ns_skiprr(cp, eom, ns_s_ar, ntohs(hp->arcount) - 1, &n); + if (status != ISC_R_SUCCESS) return (NULL); cp += n; diff --git a/minires/res_comp.c b/minires/res_comp.c index 4ca538e5..bbe2f0e6 100644 --- a/minires/res_comp.c +++ b/minires/res_comp.c @@ -52,25 +52,31 @@ */ /* - * Portions Copyright (c) 1996-1999 by Internet Software Consortium. + * Portions Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Portions Copyright (c) 1996-2003 by Internet Software Consortium * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE - * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Internet Systems Consortium, Inc. + * 950 Charter Street + * Redwood City, CA 94063 + * <info@isc.org> + * http://www.isc.org/ */ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)res_comp.c 8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: res_comp.c,v 1.2 2000/02/02 19:59:16 mellon Exp $"; +static const char rcsid[] = "$Id: res_comp.c,v 1.3 2005/03/17 20:15:18 dhankins Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> diff --git a/minires/res_findzonecut.c b/minires/res_findzonecut.c index 35d47d87..63a876e7 100644 --- a/minires/res_findzonecut.c +++ b/minires/res_findzonecut.c @@ -1,22 +1,28 @@ #if !defined(lint) && !defined(SABER) -static const char rcsid[] = "$Id: res_findzonecut.c,v 1.15 2001/06/27 00:30:34 mellon Exp $"; +static const char rcsid[] = "$Id: res_findzonecut.c,v 1.16 2005/03/17 20:15:18 dhankins Exp $"; #endif /* not lint */ /* - * Copyright (c) 1999 by Internet Software Consortium. + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1999-2003 by Internet Software Consortium * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE - * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Internet Systems Consortium, Inc. + * 950 Charter Street + * Redwood City, CA 94063 + * <info@isc.org> + * http://www.isc.org/ */ /* Import. */ @@ -355,7 +361,7 @@ get_soa(res_state statp, const char *dname, ns_class class, while (*dname != '.') { if (*dname == '\\') if (*++dname == '\0') { - ISC_R_NOSPACE; + return ISC_R_NOSPACE; } dname++; } diff --git a/minires/res_init.c b/minires/res_init.c index cfdbb596..e8170eab 100644 --- a/minires/res_init.c +++ b/minires/res_init.c @@ -52,25 +52,31 @@ */ /* - * Portions Copyright (c) 1996-1999 by Internet Software Consortium. + * Portions Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Portions Copyright (c) 1995-2003 by Internet Software Consortium * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE - * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Internet Systems Consortium, Inc. + * 950 Charter Street + * Redwood City, CA 94063 + * <info@isc.org> + * http://www.isc.org/ */ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93"; -static const char rcsid[] = "$Id: res_init.c,v 1.5 2001/06/27 00:30:35 mellon Exp $"; +static const char rcsid[] = "$Id: res_init.c,v 1.6 2005/03/17 20:15:19 dhankins Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> diff --git a/minires/res_mkquery.c b/minires/res_mkquery.c index 88fe7e6a..f24e9f9a 100644 --- a/minires/res_mkquery.c +++ b/minires/res_mkquery.c @@ -52,25 +52,31 @@ */ /* - * Portions Copyright (c) 1996-1999 by Internet Software Consortium. + * Portions Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Portions Copyright (c) 1996-2003 by Internet Software Consortium * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE - * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Internet Systems Consortium, Inc. + * 950 Charter Street + * Redwood City, CA 94063 + * <info@isc.org> + * http://www.isc.org/ */ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)res_mkquery.c 8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: res_mkquery.c,v 1.4 2001/01/16 22:33:14 mellon Exp $"; +static const char rcsid[] = "$Id: res_mkquery.c,v 1.5 2005/03/17 20:15:19 dhankins Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> diff --git a/minires/res_mkupdate.c b/minires/res_mkupdate.c index 5520a83b..c7395863 100644 --- a/minires/res_mkupdate.c +++ b/minires/res_mkupdate.c @@ -1,18 +1,24 @@ /* - * Copyright (c) 1996-1999 by Internet Software Consortium. + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1996-2003 by Internet Software Consortium * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE - * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Internet Systems Consortium, Inc. + * 950 Charter Street + * Redwood City, CA 94063 + * <info@isc.org> + * http://www.isc.org/ */ /* @@ -21,7 +27,7 @@ */ #if !defined(lint) && !defined(SABER) -static const char rcsid[] = "$Id: res_mkupdate.c,v 1.7 2001/01/11 02:16:24 mellon Exp $"; +static const char rcsid[] = "$Id: res_mkupdate.c,v 1.8 2005/03/17 20:15:19 dhankins Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -52,6 +58,7 @@ static int gethexnum_str(const u_char **, const u_char *); static int getword_str(char *, int, const unsigned char **, const unsigned char *); +static int getphrase_str(char *, int, const u_char **, const u_char *); static int getstr_str(char *, int, const u_char **, const u_char *); struct valuelist { @@ -101,7 +108,8 @@ res_nmkupdate(res_state statp, u_int16_t rtype, rclass; u_int32_t n1, rttl; u_char *dnptrs[20], **dpp, **lastdnptr; - unsigned siglen, keylen, certlen; + unsigned siglen, certlen; + int keylen; unsigned buflen = *blp; u_char *buf = (unsigned char *)bp; @@ -234,7 +242,7 @@ res_nmkupdate(res_state statp, case T_MR: case T_NS: case T_PTR: - if (!getword_str(buf2, sizeof buf2, &startp, endp)) + if (!getphrase_str(buf2, sizeof buf2, &startp, endp)) return (-1); n = dn_comp(buf2, cp, buflen, dnptrs, lastdnptr); if (n < 0) @@ -549,36 +557,6 @@ res_nmkupdate(res_state statp, cp += siglen; break; } - case ns_t_key: - /* flags */ - n = gethexnum_str(&startp, endp); - if (n < 0) - return (-1); - ShrinkBuffer(INT16SZ); - PUTSHORT(n, cp); - /* proto */ - n = getnum_str(&startp, endp); - if (n < 0) - return (-1); - ShrinkBuffer(1); - *cp++ = n; - /* alg */ - n = getnum_str(&startp, endp); - if (n < 0) - return (-1); - ShrinkBuffer(1); - *cp++ = n; - /* key */ - if ((n = getword_str(buf2, sizeof buf2, - &startp, endp)) < 0) - return (-1); - keylen = b64_pton(buf2, buf3, sizeof(buf3)); - if (keylen < 0) - return (-1); - ShrinkBuffer(keylen); - memcpy(cp, buf3, keylen); - cp += keylen; - break; case ns_t_nxt: { int success, nxt_type; @@ -613,6 +591,38 @@ res_nmkupdate(res_state statp, cp += n; break; } +#endif +#if 1 + case ns_t_key: + /* flags */ + n = gethexnum_str(&startp, endp); + if (n < 0) + return (-1); + ShrinkBuffer(INT16SZ); + PUTSHORT(n, cp); + /* proto */ + n = getnum_str(&startp, endp); + if (n < 0) + return (-1); + ShrinkBuffer(1); + *cp++ = n; + /* alg */ + n = getnum_str(&startp, endp); + if (n < 0) + return (-1); + ShrinkBuffer(1); + *cp++ = n; + /* key */ + if ((n = getword_str(buf2, sizeof buf2, + &startp, endp)) < 0) + return (-1); + keylen = b64_pton(buf2, buf3, sizeof(buf3)); + if (keylen < 0) + return (-1); + ShrinkBuffer(keylen); + memcpy(cp, buf3, keylen); + cp += keylen; + break; case ns_t_cert: /* type */ n = getnum_str(&startp, endp); @@ -645,6 +655,8 @@ res_nmkupdate(res_state statp, break; #endif default: + fprintf(stderr, "NSupdate of RR type: %d not implemented\n", + rrecp->r_type); return (-1); } /*switch*/ n = (u_int16_t)((cp - sp2) - INT16SZ); @@ -689,6 +701,35 @@ getword_str(char *buf, int size, const u_char **startpp, const u_char *endp) { } /* + * Get a phrase - possibly containing blanks - from a string (not file) + * into buf. modify the start pointer to point after the + * phrase in the string. + */ +static int +getphrase_str(char *buf, int size, const u_char **startpp, const u_char *endp) { + char *cp; + int c; + + for (cp = buf; *startpp <= endp; ) { + c = **startpp; + if (isspace(c) && cp == buf ) { + /* leading whitespace */ + (*startpp)++; + continue; + } + else if ( c == '\0' ) { + break; + } + (*startpp)++; + if (cp >= buf+size-1) + break; + *cp++ = (u_char)c; + } + *cp = '\0'; + return (cp != buf); +} + +/* * get a white spae delimited string from memory. Process quoted strings * and \DDD escapes. Return length or -1 on error. Returned string may * contain nulls. diff --git a/minires/res_query.c b/minires/res_query.c index 412da65a..0c28f75b 100644 --- a/minires/res_query.c +++ b/minires/res_query.c @@ -52,25 +52,31 @@ */ /* - * Portions Copyright (c) 1996-1999 by Internet Software Consortium. + * Portions Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Portions Copyright (c) 1996-2003 by Internet Software Consortium * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE - * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Internet Systems Consortium, Inc. + * 950 Charter Street + * Redwood City, CA 94063 + * <info@isc.org> + * http://www.isc.org/ */ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: res_query.c,v 1.4 2001/01/16 22:33:15 mellon Exp $"; +static const char rcsid[] = "$Id: res_query.c,v 1.5 2005/03/17 20:15:19 dhankins Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> diff --git a/minires/res_send.c b/minires/res_send.c index 79946a4f..31641e5e 100644 --- a/minires/res_send.c +++ b/minires/res_send.c @@ -52,25 +52,31 @@ */ /* - * Portions Copyright (c) 1996-2001 by Internet Software Consortium. + * Portions Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Portions Copyright (c) 1996-2003 by Internet Software Consortium * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE - * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Internet Systems Consortium, Inc. + * 950 Charter Street + * Redwood City, CA 94063 + * <info@isc.org> + * http://www.isc.org/ */ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: res_send.c,v 1.7 2001/02/22 07:28:25 mellon Exp $"; +static const char rcsid[] = "$Id: res_send.c,v 1.8 2005/03/17 20:15:19 dhankins Exp $"; #endif /* LIBC_SCCS and not lint */ /* Rename the I/O functions in case we're tracing. */ @@ -600,7 +606,7 @@ res_nsend(res_state statp, (unsigned)len); } Dprint(statp->options & RES_DEBUG, - (stdout, ";; new DG socket\n")) + (stdout, ";; new DG socket\n")); #endif /* CAN_RECONNECT */ statp->_flags &= ~RES_F_CONN; errno = 0; diff --git a/minires/res_sendsigned.c b/minires/res_sendsigned.c index be213afe..24045421 100644 --- a/minires/res_sendsigned.c +++ b/minires/res_sendsigned.c @@ -1,3 +1,26 @@ +/* + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1995-2003 by Internet Software Consortium + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Internet Systems Consortium, Inc. + * 950 Charter Street + * Redwood City, CA 94063 + * <info@isc.org> + * http://www.isc.org/ + */ + #include <sys/types.h> #include <sys/param.h> diff --git a/minires/res_update.c b/minires/res_update.c index 4e2a8ec1..b16da1d5 100644 --- a/minires/res_update.c +++ b/minires/res_update.c @@ -1,22 +1,28 @@ #if !defined(lint) && !defined(SABER) -static const char rcsid[] = "$Id: res_update.c,v 1.12 2001/06/27 00:30:38 mellon Exp $"; +static const char rcsid[] = "$Id: res_update.c,v 1.13 2005/03/17 20:15:20 dhankins Exp $"; #endif /* not lint */ /* - * Copyright (c) 1996-1999 by Internet Software Consortium. + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1996-2003 by Internet Software Consortium * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE - * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Internet Systems Consortium, Inc. + * 950 Charter Street + * Redwood City, CA 94063 + * <info@isc.org> + * http://www.isc.org/ */ /* |