mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-14 00:00:00 -04:00
386. [bug] Missing strdup() of ACL name caused random
ACL matching failures.
This commit is contained in:
parent
de58ecaa9c
commit
ea419adc4e
4 changed files with 12 additions and 5 deletions
3
CHANGES
3
CHANGES
|
|
@ -1,4 +1,7 @@
|
|||
|
||||
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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue