aclconf.c revision ed019cabc1cc75d4412010c331876e4ae5080a4d
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉/*
bd911976d51f102751848568ccf56592fd5f6d77Tinderbox User * Copyright (C) 1999, 2000 Internet Software Consortium.
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 *
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Permission to use, copy, modify, and distribute this software for any
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * purpose with or without fee is hereby granted, provided that the above
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * copyright notice and this permission notice appear in all copies.
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 *
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 * SOFTWARE.
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 */
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉#include <config.h>
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉#include <isc/string.h> /* Required for HP/UX (and others?) */
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉#include <isc/util.h>
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉#include <dns/acl.h>
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉#include <dns/aclconf.h>
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉#include <dns/fixedname.h>
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉#include <dns/log.h>
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉void
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉dns_aclconfctx_init(dns_aclconfctx_t *ctx) {
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 ISC_LIST_INIT(ctx->named_acl_cache);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉}
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉void
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉dns_aclconfctx_destroy(dns_aclconfctx_t *ctx) {
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 dns_acl_t *dacl, *next;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 for (dacl = ISC_LIST_HEAD(ctx->named_acl_cache);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 dacl != NULL;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 dacl = next)
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 {
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 next = ISC_LIST_NEXT(dacl, nextincache);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 dacl->name = NULL;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 dns_acl_detach(&dacl);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 }
d7201de09b85929a86b157f4b2d91667c68c6b52Automatic Updater}
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉static isc_result_t
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉convert_named_acl(char *aclname, dns_c_ctx_t *cctx,
d7201de09b85929a86b157f4b2d91667c68c6b52Automatic Updater dns_aclconfctx_t *ctx, isc_mem_t *mctx,
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 dns_acl_t **target)
d7201de09b85929a86b157f4b2d91667c68c6b52Automatic Updater{
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 isc_result_t result;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 dns_c_acl_t *cacl;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 dns_acl_t *dacl;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉
d7201de09b85929a86b157f4b2d91667c68c6b52Automatic Updater /* Look for an already-converted version. */
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 for (dacl = ISC_LIST_HEAD(ctx->named_acl_cache);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 dacl != NULL;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 dacl = ISC_LIST_NEXT(dacl, nextincache))
d7201de09b85929a86b157f4b2d91667c68c6b52Automatic Updater {
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 if (strcmp(aclname, dacl->name) == 0) {
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 dns_acl_attach(dacl, target);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 return ISC_R_SUCCESS;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 }
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 }
d7201de09b85929a86b157f4b2d91667c68c6b52Automatic Updater /* Not yet converted. Convert now. */
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 result = dns_c_acltable_getacl(cctx->acls, aclname, &cacl);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 if (result != ISC_R_SUCCESS) {
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 isc_log_write(dns_lctx, DNS_LOGCATEGORY_SECURITY,
d7201de09b85929a86b157f4b2d91667c68c6b52Automatic Updater DNS_LOGMODULE_ACL, ISC_LOG_WARNING,
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 "undefined ACL '%s'", aclname);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 return (result);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 }
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 result = dns_acl_fromconfig(cacl->ipml, cctx, ctx, mctx, &dacl);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 if (result != ISC_R_SUCCESS)
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 return (result);
d7201de09b85929a86b157f4b2d91667c68c6b52Automatic Updater dacl->name = aclname;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 ISC_LIST_APPEND(ctx->named_acl_cache, dacl, nextincache);
d7201de09b85929a86b157f4b2d91667c68c6b52Automatic Updater dns_acl_attach(dacl, target);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 return (ISC_R_SUCCESS);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉}
d7201de09b85929a86b157f4b2d91667c68c6b52Automatic Updater
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉static isc_result_t
d7201de09b85929a86b157f4b2d91667c68c6b52Automatic Updaterconvert_keyname(char *txtname, isc_mem_t *mctx, dns_name_t *dnsname) {
d7201de09b85929a86b157f4b2d91667c68c6b52Automatic Updater isc_result_t result;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 isc_buffer_t buf;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 dns_fixedname_t fixname;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 unsigned int keylen;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 keylen = strlen(txtname);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 isc_buffer_init(&buf, txtname, keylen);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 isc_buffer_add(&buf, keylen);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 dns_fixedname_init(&fixname);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 result = dns_name_fromtext(dns_fixedname_name(&fixname), &buf,
e2a61b7bb2ae967530552a2f829e07494555e886Mark Andrews dns_rootname, ISC_FALSE, NULL);
e2a61b7bb2ae967530552a2f829e07494555e886Mark Andrews if (result != ISC_R_SUCCESS) {
7cd594b8427fe742d44295790ba367e1de22a47dEvan Hunt isc_log_write(dns_lctx, DNS_LOGCATEGORY_SECURITY,
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 DNS_LOGMODULE_ACL, ISC_LOG_WARNING,
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 "key name \"%s\" is not a valid domain name",
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 txtname);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 return (result);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 }
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 return (dns_name_dup(dns_fixedname_name(&fixname), mctx, dnsname));
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉}
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉isc_result_t
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉dns_acl_fromconfig(dns_c_ipmatchlist_t *caml,
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 dns_c_ctx_t *cctx,
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 dns_aclconfctx_t *ctx,
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 isc_mem_t *mctx,
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 dns_acl_t **target)
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉{
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 isc_result_t result;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 unsigned int count;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 dns_acl_t *dacl = NULL;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 dns_aclelement_t *de;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 dns_c_ipmatchelement_t *ce;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 REQUIRE(target != NULL && *target == NULL);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 count = 0;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 for (ce = ISC_LIST_HEAD(caml->elements);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 ce != NULL;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 ce = ISC_LIST_NEXT(ce, next))
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 count++;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 result = dns_acl_create(mctx, count, &dacl);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 if (result != ISC_R_SUCCESS)
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 return (result);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 de = dacl->elements;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 for (ce = ISC_LIST_HEAD(caml->elements);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 ce != NULL;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 ce = ISC_LIST_NEXT(ce, next))
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 {
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 de->negative = dns_c_ipmatchelement_isneg(ce);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 switch (ce->type) {
d8f2dd46cba3a16c2433e85657a5b15543013ca6Mark Andrews case dns_c_ipmatch_pattern:
d8f2dd46cba3a16c2433e85657a5b15543013ca6Mark Andrews de->type = dns_aclelementtype_ipprefix;
d8f2dd46cba3a16c2433e85657a5b15543013ca6Mark Andrews isc_netaddr_fromsockaddr(&de->u.ip_prefix.address,
d8f2dd46cba3a16c2433e85657a5b15543013ca6Mark Andrews &ce->u.direct.address);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 /* XXX "mask" is a misnomer */
33c14ca653cfa827aef8b236d3110a6bce8fb6cfMark Andrews de->u.ip_prefix.prefixlen = ce->u.direct.mask;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 break;
0874abad14e3e9ecfc3dc1a1a2b9969f2f027724Mark Andrews case dns_c_ipmatch_key:
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 de->type = dns_aclelementtype_keyname;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 dns_name_init(&de->u.keyname, NULL);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 result = convert_keyname(ce->u.key, mctx,
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 &de->u.keyname);
0874abad14e3e9ecfc3dc1a1a2b9969f2f027724Mark Andrews if (result != ISC_R_SUCCESS)
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 goto cleanup;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 break;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 case dns_c_ipmatch_indirect:
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 de->type = dns_aclelementtype_nestedacl;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 result = dns_acl_fromconfig(ce->u.indirect.list,
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 cctx, ctx, mctx,
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 &de->u.nestedacl);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 if (result != ISC_R_SUCCESS)
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 goto cleanup;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 break;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 case dns_c_ipmatch_localhost:
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 de->type = dns_aclelementtype_localhost;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 break;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 case dns_c_ipmatch_any:
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 de->type = dns_aclelementtype_any;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 break;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 case dns_c_ipmatch_localnets:
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 de->type = dns_aclelementtype_localnets;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 break;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 case dns_c_ipmatch_acl:
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 de->type = dns_aclelementtype_nestedacl;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 result = convert_named_acl(ce->u.aclname,
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 cctx, ctx, mctx,
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 &de->u.nestedacl);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 if (result != ISC_R_SUCCESS)
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 goto cleanup;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 break;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 default:
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 isc_log_write(dns_lctx, DNS_LOGCATEGORY_SECURITY,
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 DNS_LOGMODULE_ACL, ISC_LOG_WARNING,
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 "address match list contains "
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 "unsupported element type");
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 result = ISC_R_FAILURE;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 goto cleanup;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 }
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 de++;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 dacl->length++;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 }
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 *target = dacl;
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 return (ISC_R_SUCCESS);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 cleanup:
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 dns_acl_detach(&dacl);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 return (result);
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉}
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉