Florian Schaal
2015-05-07 671f79d3b1162d8b88f18f71949a13063f73fd6f
Merge branch 'master' of http://git.ispconfig.org/ispconfig/ispconfig3
10 files modified
45 ■■■■ changed files
install/dist/lib/centos52.lib.php 1 ●●●● patch | view | raw | blame | history
install/dist/lib/centos53.lib.php 1 ●●●● patch | view | raw | blame | history
install/dist/lib/centos70.lib.php 1 ●●●● patch | view | raw | blame | history
install/dist/lib/fedora.lib.php 8 ●●●● patch | view | raw | blame | history
install/dist/lib/gentoo.lib.php 8 ●●●● patch | view | raw | blame | history
install/dist/lib/opensuse.lib.php 8 ●●●● patch | view | raw | blame | history
install/lib/install.lib.php 3 ●●●●● patch | view | raw | blame | history
install/lib/installer_base.lib.php 10 ●●●●● patch | view | raw | blame | history
interface/web/capp.php 2 ●●● patch | view | raw | blame | history
server/lib/classes/monitor_tools.inc.php 3 ●●●●● patch | view | raw | blame | history
install/dist/lib/centos52.lib.php
@@ -123,6 +123,7 @@
        $content = str_replace('{hostname}', $conf['hostname'], $content);
        $content = str_replace('/var/spool/amavisd/clamd.sock', '/tmp/clamd.socket', $content);
        wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content);
        chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640);
        // Adding the amavisd commands to the postfix configuration
install/dist/lib/centos53.lib.php
@@ -124,6 +124,7 @@
        $content = str_replace('{hostname}', $conf['hostname'], $content);
        $content = str_replace('/var/spool/amavisd/clamd.sock', '/var/run/clamav/clamd.sock', $content);
        wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content);
        chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640);
        // Adding the amavisd commands to the postfix configuration
install/dist/lib/centos70.lib.php
@@ -124,6 +124,7 @@
        $content = str_replace('{hostname}', $conf['hostname'], $content);
        $content = str_replace('/var/spool/amavisd/clamd.sock', '/var/run/clamav/clamd.sock', $content);
        wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content);
        chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640);
        // Adding the amavisd commands to the postfix configuration
install/dist/lib/fedora.lib.php
@@ -522,6 +522,7 @@
        $content = str_replace('{mysql_server_ip}', $conf['mysql']['ip'], $content);
        $content = str_replace('{hostname}', $conf['hostname'], $content);
        wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content);
        chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640);
        // Adding the amavisd commands to the postfix configuration
@@ -1326,7 +1327,12 @@
        
        // Add symlink for patch tool
        if(!is_link('/usr/local/bin/ispconfig_patch')) exec('ln -s /usr/local/ispconfig/server/scripts/ispconfig_patch /usr/local/bin/ispconfig_patch');
        // Change mode of a few files from amavisd
        if(is_file($conf['amavis']['config_dir'].'/conf.d/50-user')) chmod($conf['amavis']['config_dir'].'/conf.d/50-user', 0640);
        if(is_file($conf['amavis']['config_dir'].'/50-user~')) chmod($conf['amavis']['config_dir'].'/50-user~', 0400);
        if(is_file($conf['amavis']['config_dir'].'/amavisd.conf')) chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640);
        if(is_file($conf['amavis']['config_dir'].'/amavisd.conf~')) chmod($conf['amavis']['config_dir'].'/amavisd.conf~', 0400);
    }
}
install/dist/lib/gentoo.lib.php
@@ -1189,7 +1189,13 @@
        
        // Add symlink for patch tool
        if(!is_link('/usr/local/bin/ispconfig_patch')) exec('ln -s /usr/local/ispconfig/server/scripts/ispconfig_patch /usr/local/bin/ispconfig_patch');
        // Change mode of a few files from amavisd
        if(is_file($conf['amavis']['config_dir'].'/conf.d/50-user')) chmod($conf['amavis']['config_dir'].'/conf.d/50-user', 0640);
        if(is_file($conf['amavis']['config_dir'].'/50-user~')) chmod($conf['amavis']['config_dir'].'/50-user~', 0400);
        if(is_file($conf['amavis']['config_dir'].'/amavisd.conf')) chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640);
        if(is_file($conf['amavis']['config_dir'].'/amavisd.conf~')) chmod($conf['amavis']['config_dir'].'/amavisd.conf~', 0400);
    }
}
install/dist/lib/opensuse.lib.php
@@ -570,6 +570,7 @@
        $content = str_replace('{mysql_server_port}', $conf["mysql"]["port"], $content);
        $content = str_replace('{mysql_server_ip}', $conf['mysql']['ip'], $content);
        wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content);
        chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640);
        // Adding the amavisd commands to the postfix configuration
@@ -1399,7 +1400,12 @@
        
        // Add symlink for patch tool
        if(!is_link('/usr/local/bin/ispconfig_patch')) exec('ln -s /usr/local/ispconfig/server/scripts/ispconfig_patch /usr/local/bin/ispconfig_patch');
        // Change mode of a few files from amavisd
        if(is_file($conf['amavis']['config_dir'].'/conf.d/50-user')) chmod($conf['amavis']['config_dir'].'/conf.d/50-user', 0640);
        if(is_file($conf['amavis']['config_dir'].'/50-user~')) chmod($conf['amavis']['config_dir'].'/50-user~', 0400);
        if(is_file($conf['amavis']['config_dir'].'/amavisd.conf')) chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640);
        if(is_file($conf['amavis']['config_dir'].'/amavisd.conf~')) chmod($conf['amavis']['config_dir'].'/amavisd.conf~', 0400);
    }
install/lib/install.lib.php
@@ -86,6 +86,9 @@
            $mainver = array_filter($mainver);
            $mainver = current($mainver).'.'.next($mainver);
            switch ($mainver){
            case "15.04":
                $relname = "(Vivid Vervet)";
                break;
            case "14.10":
                $relname = "(Utopic Unicorn)";
                break;
install/lib/installer_base.lib.php
@@ -1099,7 +1099,7 @@
        // amavisd user config file
        $configfile = 'amavisd_user_config';
        if(is_file($conf['amavis']['config_dir'].'/conf.d/50-user')) copy($conf['amavis']['config_dir'].'/conf.d/50-user', $conf['amavis']['config_dir'].'/50-user~');
        if(is_file($conf['amavis']['config_dir'].'/conf.d/50-user~')) chmod($conf['amavis']['config_dir'].'/conf.d/50-user~', 0400);
        if(is_file($conf['amavis']['config_dir'].'/conf.d/50-user~')) chmod($conf['amavis']['config_dir'].'/50-user~', 0400);
        $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master');
        $content = str_replace('{mysql_server_ispconfig_user}', $conf['mysql']['ispconfig_user'], $content);
        $content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content);
@@ -1107,6 +1107,7 @@
        $content = str_replace('{mysql_server_port}', $conf['mysql']['port'], $content);
        $content = str_replace('{mysql_server_ip}', $conf['mysql']['ip'], $content);
        wf($conf['amavis']['config_dir'].'/conf.d/50-user', $content);
        chmod($conf['amavis']['config_dir'].'/conf.d/50-user', 0640);
        // TODO: chmod and chown on the config file
@@ -2380,6 +2381,13 @@
        // Add symlink for patch tool
        if(!is_link('/usr/local/bin/ispconfig_patch')) exec('ln -s /usr/local/ispconfig/server/scripts/ispconfig_patch /usr/local/bin/ispconfig_patch');
        
        // Change mode of a few files from amavisd
        if(is_file($conf['amavis']['config_dir'].'/conf.d/50-user')) chmod($conf['amavis']['config_dir'].'/conf.d/50-user', 0640);
        if(is_file($conf['amavis']['config_dir'].'/50-user~')) chmod($conf['amavis']['config_dir'].'/50-user~', 0400);
        if(is_file($conf['amavis']['config_dir'].'/amavisd.conf')) chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640);
        if(is_file($conf['amavis']['config_dir'].'/amavisd.conf~')) chmod($conf['amavis']['config_dir'].'/amavisd.conf~', 0400);
    }
    public function configure_dbserver() {
interface/web/capp.php
@@ -43,7 +43,7 @@
}
if(!preg_match("/^[a-z]{2,20}$/i", $mod)) die('module name contains unallowed chars.');
if($redirect != '' && !preg_match("/^[a-z0-9]+\/[a-z0-9_\.\-]+\?id=[0-9]{1,7}$/i", $redirect)) die('redirect contains unallowed chars.');
if($redirect != '' && !preg_match("/^[a-z0-9]+\/[a-z0-9_\.\-]+\?id=[0-9]{1,9}$/i", $redirect)) die('redirect contains unallowed chars.');
//* Check if user may use the module.
$user_modules = explode(",", $_SESSION["s"]["user"]["modules"]);
server/lib/classes/monitor_tools.inc.php
@@ -62,6 +62,9 @@
                $mainver = array_filter($mainver);
                $mainver = current($mainver).'.'.next($mainver);
                switch ($mainver){
                case "15.04":
                    $relname = "(Vivid Vervet)";
                    break;
                case "14.10":
                    $relname = "(Utopic Unicorn)";
                    break;