Commit ea419adc authored by Andreas Gustafsson's avatar Andreas Gustafsson
Browse files

386. [bug] Missing strdup() of ACL name caused random

                        ACL matching failures.
parent de58ecaa
386. [bug] Missing strdup() of ACL name caused random
ACL matching failures.
385. [cleanup] Removed function dns_zone_equal().
384. [bug] nsupdate was incorrectly limiting TTLs to 65535 instead
......
......@@ -15,10 +15,11 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: aclconf.c,v 1.20 2000/08/01 01:22:08 tale Exp $ */
/* $Id: aclconf.c,v 1.21 2000/08/11 01:53:47 gson Exp $ */
#include <config.h>
#include <isc/mem.h>
#include <isc/string.h> /* Required for HP/UX (and others?) */
#include <isc/util.h>
......@@ -75,7 +76,7 @@ convert_named_acl(char *aclname, dns_c_ctx_t *cctx,
result = dns_acl_fromconfig(cacl->ipml, cctx, ctx, mctx, &dacl);
if (result != ISC_R_SUCCESS)
return (result);
dacl->name = aclname;
dacl->name = isc_mem_strdup(dacl->mctx, aclname);
ISC_LIST_APPEND(ctx->named_acl_cache, dacl, nextincache);
dns_acl_attach(dacl, target);
return (ISC_R_SUCCESS);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: acl.c,v 1.13 2000/08/01 01:22:07 tale Exp $ */
/* $Id: acl.c,v 1.14 2000/08/11 01:53:46 gson Exp $ */
#include <config.h>
......@@ -242,6 +242,8 @@ destroy(dns_acl_t *dacl) {
if (dacl->elements != NULL)
isc_mem_put(dacl->mctx, dacl->elements,
dacl->alloc * sizeof(dns_aclelement_t));
if (dacl->name != NULL)
isc_mem_free(dacl->mctx, dacl->name);
dacl->magic = 0;
isc_mem_put(dacl->mctx, dacl, sizeof(*dacl));
}
......
......@@ -15,10 +15,11 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: aclconf.c,v 1.20 2000/08/01 01:22:08 tale Exp $ */
/* $Id: aclconf.c,v 1.21 2000/08/11 01:53:47 gson Exp $ */
#include <config.h>
#include <isc/mem.h>
#include <isc/string.h> /* Required for HP/UX (and others?) */
#include <isc/util.h>
......@@ -75,7 +76,7 @@ convert_named_acl(char *aclname, dns_c_ctx_t *cctx,
result = dns_acl_fromconfig(cacl->ipml, cctx, ctx, mctx, &dacl);
if (result != ISC_R_SUCCESS)
return (result);
dacl->name = aclname;
dacl->name = isc_mem_strdup(dacl->mctx, aclname);
ISC_LIST_APPEND(ctx->named_acl_cache, dacl, nextincache);
dns_acl_attach(dacl, target);
return (ISC_R_SUCCESS);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment