From d373365d8fa00fe18a0720a13c2b2ee1f1d3d796 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Mon, 8 Jun 2020 17:40:40 -0400 Subject: [PATCH] Fix #413: Add return values for bind update domains hooks hook_updatedomains_dns_{add,del} have their return values checked in m_dom::update_domains() to set the dns_result column. When no return value is specified, the value is actually NULL and doesn't get mapped to an integer value that is expected by the dns_result column. As a result, the query fails silently and the DNS_ACTION column is never updated. This causes update_domains to retry the same modification on every run. --- bureau/class/m_bind.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bureau/class/m_bind.php b/bureau/class/m_bind.php index 7c903a47..b4fb9214 100644 --- a/bureau/class/m_bind.php +++ b/bureau/class/m_bind.php @@ -68,7 +68,7 @@ class m_bind { $serial=date("Ymd")."00"; $islocked=false; } - if ($islocked) return; + if ($islocked) return 1; // Prepare a new zonefile from a template $zone = file_get_contents($this->ZONE_TEMPLATE); @@ -117,6 +117,7 @@ class m_bind { } else { $this->shouldreload=true; } + return 0; } @@ -141,9 +142,10 @@ class m_bind { ) { $this->shouldreconfig=true; } else { - return; + return 0; } @unlink($this->zone_file_directory."/".$domain); + return 0; }