Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
lolo888
ISPConfig 3
Commits
fa029ba0
Commit
fa029ba0
authored
Aug 14, 2014
by
Till Brehm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added security directory.
parent
1bcc716d
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
95 additions
and
5 deletions
+95
-5
install/dist/lib/fedora.lib.php
install/dist/lib/fedora.lib.php
+12
-2
install/dist/lib/gentoo.lib.php
install/dist/lib/gentoo.lib.php
+11
-1
install/dist/lib/opensuse.lib.php
install/dist/lib/opensuse.lib.php
+11
-1
install/lib/installer_base.lib.php
install/lib/installer_base.lib.php
+11
-1
security/check.php
security/check.php
+47
-0
security/data/empty.dir
security/data/empty.dir
+0
-0
server/server.sh
server/server.sh
+3
-0
No files found.
install/dist/lib/fedora.lib.php
View file @
fa029ba0
...
...
@@ -958,13 +958,13 @@ class installer_dist extends installer_base {
$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 director
e
ies 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
"
);
...
...
@@ -976,6 +976,16 @@ class installer_dist extends installer_base {
$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
View file @
fa029ba0
...
...
@@ -856,7 +856,7 @@ class installer extends installer_base
$command
=
'chmod 755 '
.
$install_dir
;
caselog
(
$command
.
' &> /dev/null'
,
__FILE__
,
__LINE__
,
"EXECUTED:
$command
"
,
"Failed to execute the command
$command
"
);
//* Chmod the files and director
e
ies 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
"
);
...
...
@@ -868,6 +868,16 @@ class installer extends installer_base
$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
View file @
fa029ba0
...
...
@@ -1034,7 +1034,7 @@ class installer_dist extends installer_base {
$command
=
'chmod 755 '
.
$install_dir
;
caselog
(
$command
.
' &> /dev/null'
,
__FILE__
,
__LINE__
,
"EXECUTED:
$command
"
,
"Failed to execute the command
$command
"
);
//* Chmod the files and director
e
ies 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
"
);
...
...
@@ -1046,6 +1046,16 @@ class installer_dist extends installer_base {
$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
View file @
fa029ba0
...
...
@@ -1891,7 +1891,7 @@ class installer_base {
$command
=
'chmod 755 '
.
$install_dir
;
caselog
(
$command
.
' &> /dev/null'
,
__FILE__
,
__LINE__
,
"EXECUTED:
$command
"
,
"Failed to execute the command
$command
"
);
//* Chmod the files and director
e
ies 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
"
);
...
...
@@ -1903,6 +1903,16 @@ class installer_base {
$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
0 → 100644
View file @
fa029ba0
<?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'
);
?>
\ No newline at end of file
security/data/empty.dir
0 → 100644
View file @
fa029ba0
server/server.sh
View file @
fa029ba0
...
...
@@ -13,5 +13,8 @@ if [ -f /usr/local/ispconfig/server/lib/php.ini ]; then
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment