From dd141475fee445d48a606f0a8f0d5e8b024e7908 Mon Sep 17 00:00:00 2001 From: Jeremy-Boyle <9406398+Jeremy-Boyle@users.noreply.github.com> Date: Thu, 14 Nov 2024 10:53:37 -0600 Subject: [PATCH] Renamed scripts to be more inclusive to what they do Signed-off-by: Jeremy-Boyle <9406398+Jeremy-Boyle@users.noreply.github.com> --- dns/bind/Makefile | 2 +- dns/bind/pkg-descr | 4 ++ .../OPNsense/Bind/Api/KeyController.php | 65 +++++++++++++++++++ .../OPNsense/Bind/GeneralController.php | 1 + .../OPNsense/Bind/forms/dialogEditBindKey.xml | 28 ++++++++ .../forms/dialogEditBindPrimaryDomain.xml | 14 ++-- .../OPNsense/Bind/forms/general.xml | 16 ++--- .../mvc/app/models/OPNsense/Bind/Domain.xml | 10 +++ .../mvc/app/models/OPNsense/Bind/General.xml | 27 +++++++- .../mvc/app/models/OPNsense/Bind/Key.php | 45 +++++++++++++ .../mvc/app/models/OPNsense/Bind/Key.xml | 42 ++++++++++++ .../mvc/app/views/OPNsense/Bind/general.volt | 51 +++++++++++++++ .../scripts/OPNsense/Bind/freezeZones.sh | 3 + .../scripts/OPNsense/Bind/thawZones.sh | 3 + .../service/conf/actions.d/actions_bind.conf | 12 ++-- .../templates/OPNsense/Bind/named.conf | 57 +++++++++++++--- .../service/templates/OPNsense/Bind/rndc.conf | 11 ++-- 17 files changed, 357 insertions(+), 34 deletions(-) create mode 100644 dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/Api/KeyController.php create mode 100644 dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/forms/dialogEditBindKey.xml create mode 100644 dns/bind/src/opnsense/mvc/app/models/OPNsense/Bind/Key.php create mode 100644 dns/bind/src/opnsense/mvc/app/models/OPNsense/Bind/Key.xml create mode 100644 dns/bind/src/opnsense/scripts/OPNsense/Bind/freezeZones.sh create mode 100644 dns/bind/src/opnsense/scripts/OPNsense/Bind/thawZones.sh diff --git a/dns/bind/Makefile b/dns/bind/Makefile index 03621be6e4..269b88c4c8 100644 --- a/dns/bind/Makefile +++ b/dns/bind/Makefile @@ -1,5 +1,5 @@ PLUGIN_NAME= bind -PLUGIN_VERSION= 1.33 +PLUGIN_VERSION= 1.34 PLUGIN_COMMENT= BIND domain name service PLUGIN_DEPENDS= bind920 PLUGIN_MAINTAINER= m.muenz@gmail.com diff --git a/dns/bind/pkg-descr b/dns/bind/pkg-descr index 3457965b84..57dd3b0f28 100644 --- a/dns/bind/pkg-descr +++ b/dns/bind/pkg-descr @@ -8,6 +8,10 @@ WWW: https://www.isc.org Plugin Changelog ================ +1.34 + +* Added page for management of keys for rndc control and transfer usage (contributed by Jeremy Jeremy-Boyle) +* Fix out of sync journal with pre-start and pre-stop scripts (contributed by Jeremy Jeremy-Boyle) 1.33 diff --git a/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/Api/KeyController.php b/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/Api/KeyController.php new file mode 100644 index 0000000000..33b6b0174a --- /dev/null +++ b/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/Api/KeyController.php @@ -0,0 +1,65 @@ +searchBase('keys.key', array("enabled", "name","algo","secret")); + } + public function getKeyAction($uuid = null) + { + $this->sessionClose(); + return $this->getBase('key', 'keys.key', $uuid); + } + public function addKeyAction() + { + return $this->addBase('key', 'keys.key'); + } + public function delKeyAction($uuid) + { + return $this->delBase('keys.key', $uuid); + } + public function setKeyAction($uuid) + { + return $this->setBase('key', 'keys.key', $uuid); + } + public function toggleKeyAction($uuid) + { + return $this->toggleBase('keys.key', $uuid); + } +} diff --git a/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/GeneralController.php b/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/GeneralController.php index 663acb0589..2a62d870dd 100644 --- a/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/GeneralController.php +++ b/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/GeneralController.php @@ -35,6 +35,7 @@ public function indexAction() $this->view->generalForm = $this->getForm("general"); $this->view->dnsblForm = $this->getForm("dnsbl"); $this->view->formDialogEditBindAcl = $this->getForm("dialogEditBindAcl"); + $this->view->formDialogEditBindKey = $this->getForm("dialogEditBindKey"); $this->view->formDialogEditBindPrimaryDomain = $this->getForm("dialogEditBindPrimaryDomain"); $this->view->formDialogEditBindSecondaryDomain = $this->getForm("dialogEditBindSecondaryDomain"); $this->view->formDialogEditBindRecord = $this->getForm("dialogEditBindRecord"); diff --git a/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/forms/dialogEditBindKey.xml b/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/forms/dialogEditBindKey.xml new file mode 100644 index 0000000000..6a0578ecc5 --- /dev/null +++ b/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/forms/dialogEditBindKey.xml @@ -0,0 +1,28 @@ +
\ No newline at end of file diff --git a/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/forms/dialogEditBindPrimaryDomain.xml b/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/forms/dialogEditBindPrimaryDomain.xml index 8439403d18..a7fb93ed98 100644 --- a/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/forms/dialogEditBindPrimaryDomain.xml +++ b/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/forms/dialogEditBindPrimaryDomain.xml @@ -17,11 +17,17 @@{{ lang._('Enabled') }} | +{{ lang._('Name') }} | +{{ lang._('ID') }} | +{{ lang._('Commands') }} | +|
---|---|---|---|---|
+ | + + + | +