* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: confctx.c,v 1.91 2000/10/04 18:47:23 bwelling Exp $ */
+/* $Id: confctx.c,v 1.92 2000/10/12 00:38:29 bwelling Exp $ */
#include <config.h>
options->tkeydhkeycp, options->tkeydhkeyi);
}
+ PRINT_CHAR_P(tkeygsscred, "tkey-gssapi-credential");
dns_c_printtabs(fp, indent);
fprintf(fp,"};\n");
opts->tkeydhkeycp = NULL;
opts->tkeydhkeyi = 0;
opts->tkeydomain = NULL;
+ opts->tkeygsscred = NULL;
opts->also_notify = NULL;
FREESTRING(tkeydomain);
FREESTRING(tkeydhkeycp);
+ FREESTRING(tkeygsscred);
if (options->also_notify != NULL) {
dns_c_iplist_detach(&options->also_notify);
}
+isc_result_t
+dns_c_ctx_settkeygsscred(dns_c_ctx_t *cfg, const char *newval)
+{
+ isc_result_t res;
+
+ REQUIRE(DNS_C_CONFCTX_VALID(cfg));
+
+ res = make_options(cfg);
+ if (res != ISC_R_SUCCESS) {
+ return (res);
+ }
+
+ return (cfg_set_string(cfg->options,
+ &cfg->options->tkeygsscred,
+ newval));
+}
+
}
+isc_result_t
+dns_c_ctx_gettkeygsscred(dns_c_ctx_t *cfg, char **retval)
+{
+ REQUIRE(DNS_C_CONFCTX_VALID(cfg));
+ REQUIRE(retval != NULL);
+
+ if (cfg->options == NULL) {
+ return (ISC_R_NOTFOUND);
+ }
+
+ REQUIRE(DNS_C_CONFOPT_VALID(cfg->options));
+
+ *retval = cfg->options->tkeygsscred;
+
+ return (*retval == NULL ? ISC_R_NOTFOUND : ISC_R_SUCCESS);
+}
+
+
isc_result_t
dns_c_ctx_addlisten_on(dns_c_ctx_t *cfg, in_port_t port,
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: confparser.y.dirty,v 1.19 2000/10/09 18:20:18 bwelling Exp $ */
+/* $Id: confparser.y.dirty,v 1.20 2000/10/12 00:38:27 bwelling Exp $ */
#include <config.h>
%token L_TCP_CLIENTS
%token L_TKEY_DHKEY
%token L_TKEY_DOMAIN
+%token L_TKEY_GSSAPI_CREDENTIAL
%token L_TOPOLOGY
%token L_TRANSFERS
%token L_TRANSFERS_IN
isc_mem_free(memctx, $2);
}
+ | L_TKEY_GSSAPI_CREDENTIAL L_QSTRING
+ {
+ tmpres = dns_c_ctx_settkeygsscred(currcfg, $2);
+
+ if (tmpres == ISC_R_EXISTS) {
+ parser_error(ISC_FALSE,
+ "cannot redefine tkey-gssapi-credential");
+ YYABORT;
+ } else if (tmpres != ISC_R_SUCCESS) {
+ parser_error(ISC_FALSE,
+ "set tkey-gssapi-credential error: %s: %s",
+ isc_result_totext(tmpres), $2);
+ YYABORT;
+ }
+
+ isc_mem_free(memctx, $2);
+ }
| L_PIDFILE L_QSTRING
{
tmpres = dns_c_ctx_setpidfilename(currcfg, $2);
{ "tcp-clients", L_TCP_CLIENTS },
{ "tkey-dhkey", L_TKEY_DHKEY },
{ "tkey-domain", L_TKEY_DOMAIN },
+ { "tkey-gssapi-credential", L_TKEY_GSSAPI_CREDENTIAL },
{ "topology", L_TOPOLOGY },
{ "transfer-format", L_TRANSFER_FORMAT },
{ "transfer-source", L_TRANSFER_SOURCE },
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: confctx.h,v 1.53 2000/10/04 18:47:17 bwelling Exp $ */
+/* $Id: confctx.h,v 1.54 2000/10/12 00:38:30 bwelling Exp $ */
#ifndef DNS_CONFCTX_H
#define DNS_CONFCTX_H 1
char *tkeydhkeycp;
isc_uint32_t tkeydhkeyi;
char *tkeydomain;
+ char *tkeygsscred;
dns_notifytype_t *notify;
dns_c_iplist_t *also_notify;
isc_result_t dns_c_ctx_gettkeydomain(dns_c_ctx_t *cfg, char **retval);
/* XXX need unset version */
+isc_result_t dns_c_ctx_settkeygsscred(dns_c_ctx_t *cfg, const char *newval);
+isc_result_t dns_c_ctx_gettkeygsscred(dns_c_ctx_t *cfg, char **retval);
+/* XXX need unset version */
+
isc_result_t dns_c_ctx_setalsonotify(dns_c_ctx_t *ctx, dns_c_iplist_t *newval);
isc_result_t dns_c_ctx_getalsonotify(dns_c_ctx_t *ctx, dns_c_iplist_t **ret);