Till Brehm
2014-08-14 fa029ba07e16cf79f2adc8e049c0d981ec61d18e
Added security directory.
2 files added
5 files modified
100 ■■■■■ changed files
install/dist/lib/fedora.lib.php 14 ●●●● patch | view | raw | blame | history
install/dist/lib/gentoo.lib.php 12 ●●●●● patch | view | raw | blame | history
install/dist/lib/opensuse.lib.php 12 ●●●●● patch | view | raw | blame | history
install/lib/installer_base.lib.php 12 ●●●●● patch | view | raw | blame | history
security/check.php 47 ●●●●● patch | view | raw | blame | history
security/data/empty.dir patch | view | raw | blame | history
server/server.sh 3 ●●●●● patch | view | raw | blame | history
install/dist/lib/fedora.lib.php
@@ -958,13 +958,13 @@
            $this->db->query($sql);
        }
        /// chown install dir to root and chmod 755
        // chown install dir to root and chmod 755
        $command = 'chown root:root '.$install_dir;
        caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
        $command = 'chmod 755 '.$install_dir;
        caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
        //* Chmod the files and directoreies in the install dir
        //* Chmod the files and directories in the install dir
        $command = 'chmod -R 750 '.$install_dir.'/*';
        caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
@@ -975,6 +975,16 @@
        //* chown the server files to the root user and group
        $command = 'chown -R root:root '.$install_dir.'/server';
        caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
        //* chown the security files to the root user and group
        $command = 'chown -R root:root '.$install_dir.'/security';
        caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
        //* chown the security directory and security_settings.ini to root:ispconfig
        $command = 'chown root:ispconfig '.$install_dir.'/security/security_settings.ini';
        caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
        $command = 'chown root:ispconfig '.$install_dir.'/security';
        caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
        //* Make the global language file directory group writable
        exec("chmod -R 770 $install_dir/interface/lib/lang");
install/dist/lib/gentoo.lib.php
@@ -856,7 +856,7 @@
        $command = 'chmod 755 '.$install_dir;
        caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
        //* Chmod the files and directoreies in the install dir
        //* Chmod the files and directories in the install dir
        $command = 'chmod -R 750 '.$install_dir.'/*';
        caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
@@ -867,6 +867,16 @@
        //* chown the server files to the root user and group
        $command = 'chown -R root:root '.$install_dir.'/server';
        caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
        //* chown the security files to the root user and group
        $command = 'chown -R root:root '.$install_dir.'/security';
        caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
        //* chown the security directory and security_settings.ini to root:ispconfig
        $command = 'chown root:ispconfig '.$install_dir.'/security/security_settings.ini';
        caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
        $command = 'chown root:ispconfig '.$install_dir.'/security';
        caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
        //* Make the global language file directory group writable
        exec("chmod -R 770 $install_dir/interface/lib/lang");
install/dist/lib/opensuse.lib.php
@@ -1034,7 +1034,7 @@
        $command = 'chmod 755 '.$install_dir;
        caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
        //* Chmod the files and directoreies in the install dir
        //* Chmod the files and directories in the install dir
        $command = 'chmod -R 750 '.$install_dir.'/*';
        caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
@@ -1045,6 +1045,16 @@
        //* chown the server files to the root user and group
        $command = 'chown -R root:root '.$install_dir.'/server';
        caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
        //* chown the security files to the root user and group
        $command = 'chown -R root:root '.$install_dir.'/security';
        caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
        //* chown the security directory and security_settings.ini to root:ispconfig
        $command = 'chown root:ispconfig '.$install_dir.'/security/security_settings.ini';
        caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
        $command = 'chown root:ispconfig '.$install_dir.'/security';
        caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
        //* Make the global language file directory group writable
        exec("chmod -R 770 $install_dir/interface/lib/lang");
install/lib/installer_base.lib.php
@@ -1891,7 +1891,7 @@
        $command = 'chmod 755 '.$install_dir;
        caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
        //* Chmod the files and directoreies in the install dir
        //* Chmod the files and directories in the install dir
        $command = 'chmod -R 750 '.$install_dir.'/*';
        caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
@@ -1902,6 +1902,16 @@
        //* chown the server files to the root user and group
        $command = 'chown -R root:root '.$install_dir.'/server';
        caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
        //* chown the security files to the root user and group
        $command = 'chown -R root:root '.$install_dir.'/security';
        caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
        //* chown the security directory and security_settings.ini to root:ispconfig
        $command = 'chown root:ispconfig '.$install_dir.'/security/security_settings.ini';
        caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
        $command = 'chown root:ispconfig '.$install_dir.'/security';
        caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
        //* Make the global language file directory group writable
        exec("chmod -R 770 $install_dir/interface/lib/lang");
security/check.php
New file
@@ -0,0 +1,47 @@
<?php
/*
Copyright (c) 2014, Till Brehm, ISPConfig UG
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
    * Redistributions of source code must retain the above copyright notice,
      this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
    * Neither the name of ISPConfig nor the names of its contributors
      may be used to endorse or promote products derived from this software without
      specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
define('SCRIPT_PATH', dirname($_SERVER["SCRIPT_FILENAME"]));
require SCRIPT_PATH."/lib/config.inc.php";
require SCRIPT_PATH."/lib/app.inc.php";
set_time_limit(0);
ini_set('error_reporting', E_ALL & ~E_NOTICE);
// make sure server_id is always an int
$conf['server_id'] = intval($conf['server_id']);
// Load required base-classes
$app->uses('ini_parser,file,services,getconf,system');
?>
security/data/empty.dir
server/server.sh
@@ -13,5 +13,8 @@
        fi
fi
cd /usr/local/ispconfig/security
/usr/bin/php -q /usr/local/ispconfig/security/check.php
cd /usr/local/ispconfig/server
/usr/bin/php -q /usr/local/ispconfig/server/server.php