From accfe5ed9238e8dba04ab2524fbc69cf3295739a Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Mon, 09 Apr 2012 18:20:08 -0400
Subject: [PATCH] - Fixed FS#2099.

---
 server/plugins-available/bind_plugin.inc.php |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php
index e5a7120..bb98f36 100644
--- a/server/plugins-available/bind_plugin.inc.php
+++ b/server/plugins-available/bind_plugin.inc.php
@@ -208,6 +208,16 @@
 			if(is_file($filename)) unset($filename);
 		}
 		
+		//* Ensure that the named slave directory is writable by the named user
+		if (file_exists('/etc/gentoo-release')) {
+			$slave_record_dir = $dns_config['bind_zonefiles_dir'].'/sec';
+		} else {
+			$slave_record_dir = $dns_config['bind_zonefiles_dir'].'/slave';
+		}
+		if(!@is_dir($slave_record_dir)) mkdir($slave_record_dir,0770);
+		chown($slave_record_dir,$dns_config['bind_user']);
+		chgrp($slave_record_dir,$dns_config['bind_group']);
+		
 		//* Reload bind nameserver
 		$app->services->restartServiceDelayed('bind','reload');
      		

--
Gitblit v1.9.1