mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-02 15:45:25 +00:00
Added tkey-domain and tkey-dhkey support.
This commit is contained in:
@@ -15,16 +15,9 @@
|
|||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
#if 0
|
|
||||||
/*
|
|
||||||
TODO:
|
|
||||||
use log context for yyerror if appropriate.
|
|
||||||
handle the L_VIEW options
|
|
||||||
*/
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(lint) && !defined(SABER)
|
#if !defined(lint) && !defined(SABER)
|
||||||
static char rcsid[] = "$Id: confparser.y,v 1.12 1999/10/23 00:02:07 halley Exp $";
|
static char rcsid[] = "$Id: confparser.y,v 1.13 1999/10/25 10:00:38 brister Exp $";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
@@ -153,6 +146,8 @@ static int debug_lexer;
|
|||||||
%token L_DIRECTORY
|
%token L_DIRECTORY
|
||||||
%token L_PIDFILE
|
%token L_PIDFILE
|
||||||
%token L_NAMED_XFER
|
%token L_NAMED_XFER
|
||||||
|
%token L_TKEY_DOMAIN
|
||||||
|
%token L_TKEY_DHKEY
|
||||||
%token L_DUMP_FILE
|
%token L_DUMP_FILE
|
||||||
%token L_STATS_FILE
|
%token L_STATS_FILE
|
||||||
%token L_MEMSTATS_FILE
|
%token L_MEMSTATS_FILE
|
||||||
@@ -440,6 +435,35 @@ option: /* Empty */
|
|||||||
|
|
||||||
isc_mem_free(memctx, $2);
|
isc_mem_free(memctx, $2);
|
||||||
}
|
}
|
||||||
|
| L_TKEY_DOMAIN L_QSTRING
|
||||||
|
{
|
||||||
|
tmpres = dns_c_ctx_settkeydomain(logcontext, currcfg, $2);
|
||||||
|
|
||||||
|
if (tmpres == ISC_R_EXISTS) {
|
||||||
|
parser_error(ISC_FALSE, "Redefining tkey-domain");
|
||||||
|
} else if (tmpres != ISC_R_SUCCESS) {
|
||||||
|
parser_error(ISC_FALSE,
|
||||||
|
"set tkey-domain error: %s: %s",
|
||||||
|
isc_result_totext(tmpres), $2);
|
||||||
|
YYABORT;
|
||||||
|
}
|
||||||
|
|
||||||
|
isc_mem_free(memctx, $2);
|
||||||
|
}
|
||||||
|
| L_TKEY_DHKEY L_QSTRING
|
||||||
|
{
|
||||||
|
tmpres = dns_c_ctx_settkeydhkey(logcontext, currcfg, $2);
|
||||||
|
|
||||||
|
if (tmpres == ISC_R_EXISTS) {
|
||||||
|
parser_error(ISC_FALSE, "Redefining tkey-dhkey");
|
||||||
|
} else if (tmpres != ISC_R_SUCCESS) {
|
||||||
|
parser_error(ISC_FALSE, "set tkey-dhkey error: %s: %s",
|
||||||
|
isc_result_totext(tmpres), $2);
|
||||||
|
YYABORT;
|
||||||
|
}
|
||||||
|
|
||||||
|
isc_mem_free(memctx, $2);
|
||||||
|
}
|
||||||
| L_PIDFILE L_QSTRING
|
| L_PIDFILE L_QSTRING
|
||||||
{
|
{
|
||||||
tmpres = dns_c_ctx_setpidfilename(logcontext, currcfg, $2);
|
tmpres = dns_c_ctx_setpidfilename(logcontext, currcfg, $2);
|
||||||
@@ -1937,6 +1961,47 @@ server_info: L_BOGUS yea_or_nay
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} key_list L_RBRACE
|
} key_list L_RBRACE
|
||||||
|
| L_TKEY_DOMAIN L_QSTRING
|
||||||
|
{
|
||||||
|
dns_c_srv_t *server;
|
||||||
|
|
||||||
|
INSIST(currcfg->servers != NULL);
|
||||||
|
server = ISC_LIST_TAIL(currcfg->servers->elements);
|
||||||
|
INSIST(server != NULL);
|
||||||
|
|
||||||
|
tmpres = dns_c_srv_settkeydomain(logcontext, server, $2);
|
||||||
|
|
||||||
|
if (tmpres == ISC_R_EXISTS) {
|
||||||
|
parser_error(ISC_FALSE, "Redefining tkey-domain");
|
||||||
|
} else if (tmpres != ISC_R_SUCCESS) {
|
||||||
|
parser_error(ISC_FALSE,
|
||||||
|
"set tkey-domain error: %s: %s",
|
||||||
|
isc_result_totext(tmpres), $2);
|
||||||
|
YYABORT;
|
||||||
|
}
|
||||||
|
|
||||||
|
isc_mem_free(memctx, $2);
|
||||||
|
}
|
||||||
|
| L_TKEY_DHKEY L_QSTRING
|
||||||
|
{
|
||||||
|
dns_c_srv_t *server;
|
||||||
|
|
||||||
|
INSIST(currcfg->servers != NULL);
|
||||||
|
server = ISC_LIST_TAIL(currcfg->servers->elements);
|
||||||
|
INSIST(server != NULL);
|
||||||
|
|
||||||
|
tmpres = dns_c_srv_settkeydhkey(logcontext, server, $2);
|
||||||
|
|
||||||
|
if (tmpres == ISC_R_EXISTS) {
|
||||||
|
parser_error(ISC_FALSE, "Redefining tkey-dhkey");
|
||||||
|
} else if (tmpres != ISC_R_SUCCESS) {
|
||||||
|
parser_error(ISC_FALSE, "set tkey-dhkey error: %s: %s",
|
||||||
|
isc_result_totext(tmpres), $2);
|
||||||
|
YYABORT;
|
||||||
|
}
|
||||||
|
|
||||||
|
isc_mem_free(memctx, $2);
|
||||||
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -3355,6 +3420,8 @@ static struct token keyword_tokens [] = {
|
|||||||
{ "stub", L_STUB },
|
{ "stub", L_STUB },
|
||||||
{ "support-ixfr", L_SUPPORT_IXFR },
|
{ "support-ixfr", L_SUPPORT_IXFR },
|
||||||
{ "syslog", L_SYSLOG },
|
{ "syslog", L_SYSLOG },
|
||||||
|
{ "tkey-domain", L_TKEY_DOMAIN },
|
||||||
|
{ "tkey-dhkey", L_TKEY_DHKEY },
|
||||||
{ "topology", L_TOPOLOGY },
|
{ "topology", L_TOPOLOGY },
|
||||||
{ "transfer-format", L_TRANSFER_FORMAT },
|
{ "transfer-format", L_TRANSFER_FORMAT },
|
||||||
{ "transfer-source", L_TRANSFER_SOURCE },
|
{ "transfer-source", L_TRANSFER_SOURCE },
|
||||||
|
Reference in New Issue
Block a user