--- /dev/null
+/*
+ * Copyright (C) 2005, 2007, 2010-2012 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or 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.
+ */
+
+ /*
+ * An inline-signing slave should be forced to have a file option
+ */
+
+ zone "." {
+ type slave;
+ inline-signing yes;
+ masters { 10.53.0.1; };
+ };
\ No newline at end of file
/*
* If the zone type is rbt/rbt64 then master/hint zones
* require file clauses.
+ * If inline signing is used, then slave zones require a
+ * file clause as well
*/
obj = NULL;
tresult = cfg_map_get(zoptions, "database", &obj);
if (tresult == ISC_R_NOTFOUND ||
(tresult == ISC_R_SUCCESS &&
(strcmp("rbt", cfg_obj_asstring(obj)) == 0 ||
- strcmp("rbt64", cfg_obj_asstring(obj)) == 0))) {
+ strcmp("rbt64", cfg_obj_asstring(obj)) == 0)))
+ {
+ isc_result_t res1;
obj = NULL;
tresult = cfg_map_get(zoptions, "file", &obj);
- if (tresult != ISC_R_SUCCESS &&
- (ztype == MASTERZONE || ztype == HINTZONE)) {
+ obj = NULL;
+ res1 = cfg_map_get(zoptions, "inline-signing", &obj);
+ if ((tresult != ISC_R_SUCCESS &&
+ (ztype == MASTERZONE || ztype == HINTZONE)) ||
+ (ztype == SLAVEZONE && res1 == ISC_R_SUCCESS)) {
cfg_obj_log(zconfig, logctx, ISC_LOG_ERROR,
- "zone '%s': missing 'file' entry",
- znamestr);
+ "zone '%s': missing 'file' entry",
+ znamestr);
result = tresult;
}
}