Deleted Added
full compact
check.c (135446) check.c (143731)
1/*
2 * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (C) 2001-2003 Internet Software Consortium.
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 * PERFORMANCE OF THIS SOFTWARE.
16 */
17
1/*
2 * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (C) 2001-2003 Internet Software Consortium.
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 * PERFORMANCE OF THIS SOFTWARE.
16 */
17
18/* $Id: check.c,v 1.37.6.28 2004/07/29 00:08:08 marka Exp $ */
18/* $Id: check.c,v 1.37.6.29 2004/11/22 05:02:41 marka Exp $ */
19
20#include <config.h>
21
22#include <stdlib.h>
23#include <string.h>
24
25#include <isc/buffer.h>
26#include <isc/log.h>

--- 700 unchanged lines hidden (view full) ---

727 { "max-retry-time", SLAVEZONE | STUBZONE },
728 { "min-retry-time", SLAVEZONE | STUBZONE },
729 { "max-refresh-time", SLAVEZONE | STUBZONE },
730 { "min-refresh-time", SLAVEZONE | STUBZONE },
731 { "sig-validity-interval", MASTERZONE },
732 { "zone-statistics", MASTERZONE | SLAVEZONE | STUBZONE },
733 { "allow-update", MASTERZONE },
734 { "allow-update-forwarding", SLAVEZONE },
19
20#include <config.h>
21
22#include <stdlib.h>
23#include <string.h>
24
25#include <isc/buffer.h>
26#include <isc/log.h>

--- 700 unchanged lines hidden (view full) ---

727 { "max-retry-time", SLAVEZONE | STUBZONE },
728 { "min-retry-time", SLAVEZONE | STUBZONE },
729 { "max-refresh-time", SLAVEZONE | STUBZONE },
730 { "min-refresh-time", SLAVEZONE | STUBZONE },
731 { "sig-validity-interval", MASTERZONE },
732 { "zone-statistics", MASTERZONE | SLAVEZONE | STUBZONE },
733 { "allow-update", MASTERZONE },
734 { "allow-update-forwarding", SLAVEZONE },
735 { "file", MASTERZONE | SLAVEZONE | STUBZONE | HINTZONE},
735 { "file", MASTERZONE | SLAVEZONE | STUBZONE | HINTZONE },
736 { "ixfr-base", MASTERZONE | SLAVEZONE },
737 { "ixfr-tmp-file", MASTERZONE | SLAVEZONE },
738 { "masters", SLAVEZONE | STUBZONE },
739 { "pubkey", MASTERZONE | SLAVEZONE | STUBZONE },
740 { "update-policy", MASTERZONE },
741 { "database", MASTERZONE | SLAVEZONE | STUBZONE },
742 { "key-directory", MASTERZONE },
743 };

--- 194 unchanged lines hidden (view full) ---

938
939 /*
940 * Check various options.
941 */
942 tresult = check_options(zoptions, logctx, mctx);
943 if (tresult != ISC_R_SUCCESS)
944 result = tresult;
945
736 { "ixfr-base", MASTERZONE | SLAVEZONE },
737 { "ixfr-tmp-file", MASTERZONE | SLAVEZONE },
738 { "masters", SLAVEZONE | STUBZONE },
739 { "pubkey", MASTERZONE | SLAVEZONE | STUBZONE },
740 { "update-policy", MASTERZONE },
741 { "database", MASTERZONE | SLAVEZONE | STUBZONE },
742 { "key-directory", MASTERZONE },
743 };

--- 194 unchanged lines hidden (view full) ---

938
939 /*
940 * Check various options.
941 */
942 tresult = check_options(zoptions, logctx, mctx);
943 if (tresult != ISC_R_SUCCESS)
944 result = tresult;
945
946 /*
947 * If the zone type is rbt/rbt64 then master/hint zones
948 * require file clauses.
949 */
950 obj = NULL;
951 tresult = cfg_map_get(zoptions, "database", &obj);
952 if (tresult == ISC_R_NOTFOUND ||
953 (tresult == ISC_R_SUCCESS &&
954 (strcmp("rbt", cfg_obj_asstring(obj)) == 0 ||
955 strcmp("rbt64", cfg_obj_asstring(obj)) == 0))) {
956 obj = NULL;
957 tresult = cfg_map_get(zoptions, "file", &obj);
958 if (tresult != ISC_R_SUCCESS &&
959 (ztype == MASTERZONE || ztype == HINTZONE)) {
960 cfg_obj_log(zconfig, logctx, ISC_LOG_ERROR,
961 "zone '%s': missing 'file' entry",
962 zname);
963 result = tresult;
964 }
965 }
966
946 return (result);
947}
948
949isc_result_t
950bind9_check_key(cfg_obj_t *key, isc_log_t *logctx) {
951 cfg_obj_t *algobj = NULL;
952 cfg_obj_t *secretobj = NULL;
953 const char *keyname = cfg_obj_asstring(cfg_map_getname(key));

--- 459 unchanged lines hidden ---
967 return (result);
968}
969
970isc_result_t
971bind9_check_key(cfg_obj_t *key, isc_log_t *logctx) {
972 cfg_obj_t *algobj = NULL;
973 cfg_obj_t *secretobj = NULL;
974 const char *keyname = cfg_obj_asstring(cfg_map_getname(key));

--- 459 unchanged lines hidden ---