]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove unused dns_zone_getnotifyacl() function
authorMatthijs Mekking <matthijs@isc.org>
Mon, 3 Nov 2025 11:45:39 +0000 (12:45 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Mon, 3 Nov 2025 11:45:39 +0000 (12:45 +0100)
CID 638286: Concurrent data access violations (MISSING_LOCK).  This
complains about accessing "zone->notifyctx.notify_acl" without holding
the lock "dns_zone.lock".  Elsewhere, reading this data does have the
lock, so it makes sense that in the getter function this must also be
so.  However, the function is unused so we can just remove it.

CID 638287: Concurrent data access violations (MISSING_LOCK).  This
complains about accessing "zone->locked" without holding the lock
"dns_zone.lock". I think this is a false positive as "dns__zone_lock()"
and "dns__zone_unlock() are wrappers around "LOCK_ZONE()" and
"UNLOCK_ZONE()" and where these macros were used they were only
replaced with the internal zone functions. Moreover, "zone->locked"
is only accessed in these macros (and "TRYLOCK_ZONE()" and
"LOCKED_ZONE()").

lib/dns/include/dns/zone.h
lib/dns/zone.c

index acde98421b154af080918dfe6c940697ad6d9bb2..b45c842c9a60bdc1d2185b3094745c4bd4075f5a 100644 (file)
@@ -976,19 +976,6 @@ dns_zone_setxfracl(dns_zone_t *zone, dns_acl_t *acl);
  *\li  'acl' to be valid acl.
  */
 
-dns_acl_t *
-dns_zone_getnotifyacl(dns_zone_t *zone);
-/*%<
- *     Returns the current notify acl or NULL.
- *
- * Require:
- *\li  'zone' to be a valid zone.
- *
- * Returns:
- *\li  acl a pointer to the acl.
- *\li  NULL
- */
-
 dns_acl_t *
 dns_zone_getqueryacl(dns_zone_t *zone);
 /*%<
index 280cf2b79f7fbe83032839bf6205ceb7075e6166..d0bc8b65c4b5115b9ff2c4d867f81888665b3e03 100644 (file)
@@ -15399,13 +15399,6 @@ dns_zone_setxfracl(dns_zone_t *zone, dns_acl_t *acl) {
        UNLOCK_ZONE(zone);
 }
 
-dns_acl_t *
-dns_zone_getnotifyacl(dns_zone_t *zone) {
-       REQUIRE(DNS_ZONE_VALID(zone));
-
-       return zone->notifyctx.notify_acl;
-}
-
 dns_acl_t *
 dns_zone_getqueryacl(dns_zone_t *zone) {
        REQUIRE(DNS_ZONE_VALID(zone));