confctx.c revision f83520a3d87dfd32cd0b8cecc5fd2c3ae71767b6
/*
* Copyright (C) 1999, 2000 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.
*/
/* $Id: confctx.c,v 1.109 2000/12/02 00:25:42 gson Exp $ */
#include <config.h>
#include "confpvt.h"
#ifdef PVT_CONCAT
#endif
#define PVT_CONCAT(x,y) x ## y
{ \
\
if (result != ISC_R_SUCCESS) { \
return (result); \
} \
} \
\
\
sizeof (TYPE)); \
return (ISC_R_NOMEMORY); \
} \
} else { \
} \
\
\
}
{ \
\
\
\
return (ISC_R_NOTFOUND); \
} \
\
\
return (ISC_R_NOTFOUND); \
} else { \
return (ISC_R_SUCCESS); \
} \
}
{ \
\
\
\
return (ISC_R_NOTFOUND); \
} \
\
\
return (ISC_R_NOTFOUND); \
} else { \
\
return (ISC_R_SUCCESS); \
} \
}
{ \
isc_result_t res; \
\
\
if (res != ISC_R_SUCCESS) { \
return (res); \
} \
\
}
{ \
\
return (ISC_R_NOTFOUND); \
} \
\
\
\
}
{ \
\
return (ISC_R_NOTFOUND); \
} \
\
\
return (ISC_R_NOTFOUND); \
} \
\
\
return (ISC_R_SUCCESS); \
}
{ \
isc_result_t res; \
\
\
if (res != ISC_R_SUCCESS) { \
return (res); \
} \
\
\
} \
\
return (ISC_R_SUCCESS); \
} \
{ \
\
return (ISC_R_NOTFOUND); \
} \
\
\
return (ISC_R_SUCCESS); \
} else { \
return (ISC_R_NOTFOUND); \
} \
}
{ \
\
return (ISC_R_NOTFOUND); \
} \
\
\
return (ISC_R_SUCCESS); \
}
char **field,
const char *newval);
dns_c_iplist_t **resval);
{
char *cpval;
"option 'named-xfer' is obsolete");
}
"option 'dump-file' is not yet implemented");
}
"option 'memstatistics-file' is not yet "
"implemented");
}
"the default for the 'auth-nxdomain' option "
"is now 'no'");
}
"option 'deallocate-on-exit' is obsolete");
}
"option 'fake-iquery' is obsolete");
}
"option 'fetch-glue' is obsolete");
}
"option 'has-old-clients' is obsolete");
}
"option 'host-statistics' is not yet "
"implemented");
}
"option 'multiple-cnames' is obsolete");
}
"option 'rfc2308-type-1' is not yet "
"implemented");
}
"option 'use-id-pool' is obsolete");
}
"option 'use-ixfr' is obsolete");
}
"option 'treat-cr-as-space' is obsolete");
}
&severity) != ISC_R_NOTFOUND) ||
&severity) != ISC_R_NOTFOUND) ||
&severity) != ISC_R_NOTFOUND)) {
"option 'check-names' is not implemented");
}
"option 'max-cache-size' is not yet "
"implemented");
}
"option 'min-roots' is obsolete");
}
"option 'serial-queries' is obsolete");
}
"option 'maintain-ixfr-base' is obsolete");
}
"option 'max-ixfr-log-size' is obsolete");
}
"option 'statistics-interval' is not yet "
"implemented");
}
"option 'topology' is deprecated");
}
"option 'rrset-order' is not yet implemented");
}
if (tmpres != ISC_R_SUCCESS) {
}
}
if (tmpres != ISC_R_SUCCESS) {
}
}
if (tmpres != ISC_R_SUCCESS) {
}
}
if (tmpres != ISC_R_SUCCESS) {
}
}
if (tmpres != ISC_R_SUCCESS) {
}
}
return (result);
}
/* ************************************************************************ */
{
isc_result_t r;
return (ISC_R_NOMEMORY);
}
if (r != ISC_R_SUCCESS) {
return (r);
}
r = logging_init(tmpcfg);
if (r != ISC_R_SUCCESS) {
return (r);
}
#if 1 /* XXX brister */
#else
if (r != ISC_R_SUCCESS) {
return r;
}
#endif
return (ISC_R_SUCCESS);
}
{
dns_c_ctx_t *c;
c = *cfg;
dns_peerlist_detach(&c->peers);
dns_c_acltable_delete(&c->acls);
dns_c_kdeflist_delete(&c->keydefs);
dns_c_zonelist_delete(&c->zlist);
if (c->trusted_keys != NULL)
dns_c_viewtable_delete(&c->views);
dns_c_lwreslist_delete(&c->lwres);
c->magic = 0;
isc_mem_put(c->mem, c, sizeof *c);
return (ISC_R_SUCCESS);
}
{
}
}
{
}
{
/* XXX should we validate that the zone is in our table? */
return (ISC_R_SUCCESS);
}
{
}
{
/* XXX should we validate that the zone is in our table? */
return (ISC_R_SUCCESS);
}
{
}
{
return (ISC_R_NOTFOUND);
} else {
return (ISC_R_SUCCESS);
}
}
{
return (ISC_R_SUCCESS);
} else {
return (ISC_R_FAILURE);
}
}
{
}
return (ISC_R_SUCCESS);
}
void
{
}
}
}
}
}
}
}
}
}
}
void
{
return;
}
}
}
}
}
}
} else { \
} \
}
}
\
\
\
if (port == 0) { \
} else { \
} \
}
}
#define PRINT_CHECKNAME(INDEX) \
}
}
#ifndef NOMINUM_PUBLIC
#endif /* NOMINUM_PUBLIC */
dialup, "dialup");
#ifndef NOMINUM_PUBLIC
#endif /* NOMINUM_PUBLIC */
ISC_TRUE));
}
ISC_TRUE));
}
#ifndef NOMINUM_PUBLIC
#endif /* NOMINUM_PUBLIC */
defport);
}
defport);
}
}
}
}
}
void
{
return;
}
}
}
}
{
}
}
{
return (ISC_R_NOTFOUND);
}
return (ISC_R_SUCCESS);
}
{
}
{
if (deepcopy) {
if (res != ISC_R_SUCCESS) {
return (res);
}
} else {
}
}
{
return (ISC_R_NOTFOUND);
}
}
{
return (ISC_R_NOTFOUND);
} else {
return (ISC_R_SUCCESS);
}
}
{
}
res = ISC_R_SUCCESS;
} else if (deepcopy) {
} else {
res = ISC_R_SUCCESS;
}
return (res);
}
{
&newc);
if (res != ISC_R_SUCCESS) {
return (res);
}
return (res);
}
{
if (res != ISC_R_SUCCESS) {
return (res);
}
return (res);
}
{
&newc);
if (res != ISC_R_SUCCESS) {
return (res);
}
return (res);
}
{
if (res != ISC_R_SUCCESS) {
return (res);
}
return (res);
}
{
if (res != ISC_R_SUCCESS) {
return (res);
}
return (res);
}
{
}
{
}
{
if (res != ISC_R_SUCCESS) {
return (res);
}
}
/* ***************************************************************** */
/* *********** OPTIONS *********** */
/* ***************************************************************** */
{
return (ISC_R_NOMEMORY);
}
#ifndef NOMINUM_PUBLIC
#endif /* NOMINUM_PUBLIC */
#ifndef NOMINUM_PUBLIC
#endif /* NOMINUM_PUBLIC */
opts->tkeydhkeyi = 0;
#ifndef NOMINUM_PUBLIC
#endif /* NOMINUM_PUBLIC */
return (ISC_R_SUCCESS);
}
{
isc_result_t r, result;
return (ISC_R_SUCCESS);
}
} } while (0)
#define FREESTRING(FIELD) \
} } while (0)
#define FREEIPMLIST(FIELD) \
} } while (0)
#ifndef NOMINUM_PUBLIC
#endif /* NOMINUM_PUBLIC */
}
#ifndef NOMINUM_PUBLIC
#endif /* NOMINUM_PUBLIC */
if (r != ISC_R_SUCCESS)
result = r;
}
if (r != ISC_R_SUCCESS)
result = r;
}
if (r != ISC_R_SUCCESS)
result = r;
}
if (r != ISC_R_SUCCESS)
result = r;
}
return (result);
}
#ifndef NOMINUM_PUBLIC
#endif /* NOMINUM_PUBLIC */
#ifndef NOMINUM_PUBLIC
#endif /* NOMINUM_PUBLIC */
/*
* Modifiers for options.
*
*/
{
if (res != ISC_R_SUCCESS) {
return (res);
}
newval));
}
{
if (res != ISC_R_SUCCESS) {
return (res);
}
charval));
}
{
if (res != ISC_R_SUCCESS) {
return (res);
}
newval));
}
{
if (res != ISC_R_SUCCESS) {
return (res);
}
switch(transtype) {
case dns_trans_primary:
case dns_trans_secondary:
case dns_trans_response:
break;
default:
"bad transport value: %d", transtype);
return (ISC_R_FAILURE);
}
if (!existed) {
sizeof (**ptr));
}
}
{
return (ISC_R_NOTFOUND);
}
switch (transtype) {
case dns_trans_primary:
case dns_trans_secondary:
case dns_trans_response:
break;
default:
"bad transport value: %d", transtype);
return (ISC_R_FAILURE);
}
} else {
}
return (result);
}
{
if (res != ISC_R_SUCCESS) {
return (res);
}
switch(transtype) {
case dns_trans_primary:
case dns_trans_secondary:
case dns_trans_response:
break;
default:
"bad transport value: %d", transtype);
return (ISC_R_FAILURE);
}
return (ISC_R_NOTFOUND);
}
return (ISC_R_SUCCESS);
}
#ifndef NOMINUM_PUBLIC
#endif /* NOMINUM_PUBLIC */
{
if (res != ISC_R_SUCCESS) {
return (res);
}
if (copy) {
if (res != ISC_R_SUCCESS) {
return (res);
}
} else {
}
} else {
}
res = ISC_R_SUCCESS;
}
res = ISC_R_EXISTS;
}
return (res);
}
{
if (res != ISC_R_SUCCESS) {
return (res);
}
}
if (copy) {
if (res != ISC_R_SUCCESS) {
return (res);
}
} else {
}
}
/**
** Accessors
**/
{
return (ISC_R_NOTFOUND);
}
}
{
return (ISC_R_NOTFOUND);
}
} else {
res = ISC_R_SUCCESS;
}
return (res);
}
{
return (ISC_R_NOTFOUND);
}
}
{
if (res != ISC_R_SUCCESS) {
return (res);
}
if (res != ISC_R_SUCCESS) {
return (res);
}
}
#if 0
/* XXX we should probably check that a listen on statement
* hasn't been done for the same post, ipmatch list
* combination
*/
return (ISC_R_FAILURE);
}
}
#endif
if (res != ISC_R_SUCCESS) {
return (res);
}
return (res);
}
{
return (ISC_R_NOTFOUND);
}
}
}
{
if (res != ISC_R_SUCCESS) {
return (res);
}
if (res != ISC_R_SUCCESS) {
return (res);
}
}
#if 0
/* XXX we should probably check that a listen on statement
* hasn't been done for the same post, ipmatch list
* combination
*/
return (ISC_R_FAILURE);
}
}
#endif
if (res != ISC_R_SUCCESS) {
return (res);
}
return (res);
}
{
return (ISC_R_NOTFOUND);
}
}
}
{
if (res != ISC_R_SUCCESS) {
return (res);
}
return (res);
}
{
return (ISC_R_NOTFOUND);
}
}
{
return (ISC_R_NOTFOUND);
}
} else {
return (ISC_R_SUCCESS);
}
}
{
return (ISC_R_NOTFOUND);
} else {
return (ISC_R_SUCCESS);
}
}
{
return (ISC_R_NOTFOUND);
} else {
return (ISC_R_SUCCESS);
}
}
{
return (ISC_R_NOTFOUND);
} else {
return (ISC_R_SUCCESS);
}
}
{
}
res = ISC_R_SUCCESS;
} else {
res = ISC_R_SUCCESS;
}
return (res);
}
/*
**
*/
{
if (result != ISC_R_SUCCESS) {
return (result);
}
return (ISC_R_SUCCESS);
}
{
return (ISC_R_NOTFOUND);
}
return (ISC_R_SUCCESS);
}
{
return (ISC_R_NOTFOUND);
}
return (ISC_R_SUCCESS);
} else {
return (ISC_R_NOTFOUND);
}
}
/*
**
*/
{
if (res == ISC_R_SUCCESS) {
}
}
return rval;
}
/***************************************************************************/
static isc_result_t
{
char *p;
p = *field;
if (p != NULL) {
}
if (p != NULL) {
}
p = NULL;
} else if (p == NULL) {
if (p == NULL) {
return (ISC_R_NOMEMORY);
}
} else {
if (p == NULL) {
return (ISC_R_NOMEMORY);
}
}
*field = p;
}
static isc_result_t
{
}
} else if (copy) {
}
newval);
} else {
if (res != ISC_R_SUCCESS) {
return (res);
}
}
res = ISC_R_SUCCESS;
}
res = ISC_R_EXISTS;
}
return (res);
}
static isc_result_t
{
res = ISC_R_SUCCESS;
} else {
}
return (res);
}
static isc_result_t
{
isc_result_t r;
if (r != ISC_R_SUCCESS) return (r);
return (ISC_R_SUCCESS);
}
static isc_result_t
{
if (res != ISC_R_SUCCESS) {
return (res);
}
return (ISC_R_SUCCESS);
}
static isc_result_t
{
if (res != ISC_R_SUCCESS) {
return (res);
}
}
return (res);
}