From 44c74cb7b409a9dd1ba2a51fdb5aadc8a11be70f Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Mon, 19 Jul 2010 11:30:44 -0400
Subject: [PATCH] Fixed suphp setting for OpenSuSE 11.3
---
install/lib/installer_base.lib.php | 22 +++++++++++++++++++---
1 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index b49310c..0c14b1e 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -196,7 +196,8 @@
$tpl_ini_array = ini_to_array(rf('tpl/server.ini.master'));
- // TODO: Update further distribution specific parameters for server config here
+ //* Update further distribution specific parameters for server config here
+ //* HINT: Every line added here has to be added in update.lib.php too!!
$tpl_ini_array['web']['vhost_conf_dir'] = $conf['apache']['vhost_conf_dir'];
$tpl_ini_array['web']['vhost_conf_enabled_dir'] = $conf['apache']['vhost_conf_enabled_dir'];
$tpl_ini_array['jailkit']['jailkit_chroot_app_programs'] = $conf['jailkit']['jailkit_chroot_app_programs'];
@@ -645,6 +646,8 @@
$content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content);
$content = str_replace('{mysql_server_ip}', $conf['mysql']['ip'], $content);
wf("$pam/smtp", $content);
+ // On some OSes smtp is world readable which allows for reading database information. Removing world readable rights should have no effect.
+ if(is_file("$pam/smtp")) exec("chmod o= $pam/smtp");
exec("chmod 660 $pam/smtp");
exec("chown daemon:daemon $pam/smtp");
@@ -933,7 +936,20 @@
public function configure_bind() {
global $conf;
- //* Nothing to do
+ //* Check if the zonefile directory has a slash at the end
+ $content=$conf['bind']['bind_zonefiles_dir'];
+ if(substr($content,-1,1) != '/') {
+ $content .= '/';
+ }
+
+ //* Create the slave subdirectory
+ $content .= 'slave';
+ $content_mkdir = 'mkdir -p '.$content;
+ exec($content_mkdir);
+
+ //* Chown the slave subdirectory to $conf['bind']['bind_user']
+ exec('chown '.$conf['bind']['bind_user'].':'.$conf['bind']['bind_group'].' '.$content);
+ exec('chmod 770 '.$content);
}
@@ -1638,4 +1654,4 @@
}
}
-?>
\ No newline at end of file
+?>
--
Gitblit v1.9.1