Skip to content

Commit

Permalink
Merge pull request #71 from lxcenter/6.1.x
Browse files Browse the repository at this point in the history
Make master 6.1.15
  • Loading branch information
dterweij committed Feb 5, 2014
2 parents ce79307 + 585697b commit 2800d23
Show file tree
Hide file tree
Showing 15 changed files with 86 additions and 6 deletions.
6 changes: 6 additions & 0 deletions kloxo-install/kloxo-installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,12 @@ function install_main() {
file_put_contents($options_file, "$example_options\n");
}

$pattern = 'include "/etc/kglobal.options.named.conf";';
$file = "/var/named/chroot/etc/named.conf";
$comment = "//Kloxo global config (stop being open recursors)";
addLineIfNotExist($file, $pattern, $comment);


$pattern = 'include "/etc/kloxo.named.conf";';
$file = "/var/named/chroot/etc/named.conf";
$comment = "//Kloxo";
Expand Down
7 changes: 7 additions & 0 deletions kloxo-install/kloxo-linux/installall.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ function install_main() {
if (!preg_match("+$pattern+i", $cont)) {
file_put_contents($options_file, "$example_options\n");
}

$pattern = 'include "/etc/kglobal.options.named.conf";';
$file = "/var/named/chroot/etc/named.conf";
$comment = "//Kloxo global config (stop being open recursors)";
addLineIfNotExist($file, $pattern, $comment);


$pattern = 'include "/etc/kloxo.named.conf";';
$file = "/var/named/chroot/etc/named.conf";
$comment = "//Kloxo";
Expand Down
6 changes: 6 additions & 0 deletions kloxo/RELEASEINFO/Changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
Changelog

Kloxo 6.1.15 - 05-feb-2014
##################################
Bug #949: New IP file in /var/tinydns/env is incorrect
Bug #1083: Kloxo 6.1.14 not installing
Security #1082: Cron shell disable

Kloxo 6.1.14 - 04-feb-2014
##################################
Security #1079: [GUI] Implement new PHP Core
Expand Down
12 changes: 10 additions & 2 deletions kloxo/bin/misc/djbdnsstart.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,17 @@
if (!lxfile_exists("/var/axfrdns")) {
system("axfrdns-conf axfrdns dnslog /var/axfrdns /var/tinydns 0.0.0.0");
}
$list = os_get_allips();

$out = implode("/", $list);
// Project issue #949 - Hardcode 0.0.0.0
// $list = os_get_allips();
//
// $out = implode("/", $list);
//
$out = "0.0.0.0\n";
//
// Kloxo development version has this file refactored
// LxCenter DT05022014
//

lfile_put_contents("/var/tinydns/env/IP", "$out");

Expand Down
20 changes: 20 additions & 0 deletions kloxo/httpdocs/htmllib/lib/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -5778,6 +5778,11 @@ function setSomePermissions()
function setInitialBind()
{
log_cleanup("Initialize Kloxo bind config files");
$pattern = 'include "/etc/global.options.named.conf";';

$file = "/var/named/chroot/etc/named.conf";
$comment = "//Kloxo global config (stop being open recursors)";
addLineIfNotExist($file, $pattern, $comment);

if (!lxfile_exists("/var/named/chroot/etc/kloxo.named.conf")) {
log_cleanup("- Initialize process");
Expand All @@ -5789,6 +5794,21 @@ function setInitialBind()
}
}

// Copied from the installer for setInitialBind function.
function addLineIfNotExist($filename, $pattern, $comment) {
$cont = lfile_get_contents($filename);

if (!preg_match("+$pattern+i", $cont)) {
file_put_contents($filename, "\n$comment \n\n", FILE_APPEND);
file_put_contents($filename, $pattern, FILE_APPEND);
file_put_contents($filename, "\n\n\n", FILE_APPEND);
} else {
print("Pattern '$pattern' Already present in $filename\n");
}


}

function setExecuteCentos5Script()
{
log_cleanup("Executing centos 5 script and remove epel repo");
Expand Down
11 changes: 11 additions & 0 deletions kloxo/httpdocs/htmllib/lib/pserver/cronlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ function updateform($subaction, $param)
$this->setUpdateSubaction();
$this->write();
}


if ($this->isSimple()) {
$vlist['simple_cron'] = array('M', $this->simple_cron);
Expand Down Expand Up @@ -332,7 +333,17 @@ static function add($parent, $class, $param)
$param['syncserver'] = $parent->syncserver;
}
*/

$parambase = implode("_", array($param['username'], $param['command']));

if ( !$parent->priv->isOn('cron_shell_flag')) {
if (!(substr($param['command'], 0, 5 ) === "wget ") && !(substr($param['command'], 0, 4 ) === "php ")) {

throw new lxException ("command_not_allowd", '', '');
}
}


$parambase = fix_nname_to_be_variable($parambase);
$cronlist = $parent->getList('cron');
$count = 0;
Expand Down
13 changes: 12 additions & 1 deletion kloxo/httpdocs/htmllib/lib/pserver/driver/cron__linuxlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,18 @@ function syncCreateConf()
}

if (!$v['minute']) { $v['minute'] = 0; }


if (substr($v['command'], 0, 5 ) === "wget ") {
$escarg = escapeshellarg(substr($v['command'], 5));
$v['command'] = 'wget ' . $escarg;
}
else if (substr($v['command'], 0, 4 ) === "php ") {
$escarg = escapeshellarg(substr($v['command'], 4));
$v['command'] = 'php ' . $escarg;
}
else $v['command'] = 'bad';


$cmd .= implode("\t", array($v['minute'], $v['hour'], $v['ddate'], $v['month'],$v['weekday'], $v['command']));
$cmd .= "\n";
}
Expand Down
2 changes: 2 additions & 0 deletions kloxo/httpdocs/htmllib/lib/remotelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,8 @@ function do_local_action($rmt)
class_exists($class);
}
// ---
// Since php 5.3 this wont take NULL
if(!$rmt->arglist)$rmt->arglist=array();
return call_user_func_array($rmt->func, $rmt->arglist);

}
Expand Down
5 changes: 4 additions & 1 deletion kloxo/httpdocs/htmllib/lib/updatelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ function fixDataBaseIssues()
$sq->rawQuery("update client set priv_q_webhosting_flag = 'on' where nname = 'admin'");
$sq->rawQuery("update ticket set parent_clname = 'client-admin' where subject = 'Welcome to Kloxo'");
$sq->rawQuery("update domain set dtype = 'maindomain' where dtype = 'domain'");

$sq->rawQuery("update client set priv_q_cron_shell_flag = 'on' where nname = 'admin'");


log_cleanup("- Set default database settings");
db_set_default('mmail', 'remotelocalflag', 'local');
db_set_default('mmail', 'syncserver', 'localhost');
Expand Down Expand Up @@ -170,6 +172,7 @@ function fixDataBaseIssues()
db_set_default_variable('web', 'docroot', 'nname');
db_set_default_variable('client', 'used_q_maindomain_num', 'used_q_domain_num');
db_set_default_variable('client', 'priv_q_maindomain_num', 'priv_q_domain_num');
db_set_default('client', 'priv_q_cron_shell_flag', 'off');
db_set_default("servermail", "domainkey_flag", "on");

log_cleanup("- Fix resourceplan settings in database");
Expand Down
2 changes: 2 additions & 0 deletions kloxo/httpdocs/lang/en/desclib.php
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@
$__description["hour"] = array("Hour");
$__description["day_of_week"] = array("Day Of Week");
$__description["command"] = array("Command");
$__description["url_to_load"] = array("URL to Load");
$__description["simple"] = array("Simple");
$__description["standard"] = array("Standard");
$__description["if_every_day_the_hour"] = array("If Every Day The Hour");
Expand Down Expand Up @@ -720,6 +721,7 @@
$__description["enable_php"] = array("Enable Php");
$__description["can_manage_dns"] = array("Can Manage Dns");
$__description["allow_scheduler_management"] = array("Allow Scheduler Management");
$__description["allow_cron_shell"] = array("Allow Shell acces in Cron");
$__description["enable_asp.net_(ignored_on_linux)"] = array("Enable Asp.net (ignored On Linux)");
$__description["mysql_database_server_pool"] = array("Mysql Database Server Pool");
$__description["mssql_database_server_pool"] = array("Mssql Database Server Pool");
Expand Down
2 changes: 2 additions & 0 deletions kloxo/httpdocs/lang/en/messagelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,5 @@
$__emessage['forwardaddress cannot be empty'] = 'The forward-to address cannot be empty.';
$__emessage['forwardaddress invaild'] = 'The forward-to address is invalid.';
$__emessage['folder_name_may_not_contain_doubledotsslash'] = "Folder name must not contain ../ (double dots).";
$__emessage['command_not_allowd'] = "Command not allowed! (You only have privilege to run 'php' or 'wget' in cron.)";

1 change: 1 addition & 0 deletions kloxo/httpdocs/lib/domain/web/weblib.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ class Web extends Lxdb {
static $__desc_dotnet_flag = array("q", "", "enable_asp.net_(windows_only)");
static $__desc_frontpage_flag = array("q", "", "enable_frontpage");
static $__desc_cron_manage_flag = array("q", "", "allow_scheduler_management");
static $__desc_cron_shell_flag = array("q", "", "allow_cron_shell");
static $__desc_installapp_flag = array("q", "", "enable_installapp");
static $__desc_text_lighty_rewrite = array("t", "", "lighttp_rewrite_rule");
//static $__desc_subweb_a_num = array("q", "", "number_of_subdomains");
Expand Down
1 change: 1 addition & 0 deletions kloxo/httpdocs/lib/resourcecorelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ abstract class Resourcecore extends Lxclient {
static $__desc_dns_manage_flag = array("q", "", "can_manage_dns");
//static $__desc_ddatabase_usage = array("q", "", "database_disk_usage_(MB)");
static $__desc_cron_manage_flag = array("q", "", "allow_scheduler_management");
static $__desc_cron_shell_flag = array("q", "", "allow_cron_shell");
//static $__desc_phpunsafe_flag = array("q", "", "can_enable_php_unsafe_mode");
static $__desc_dotnet_flag = array("q", "", "enable_asp.net_(ignored_on_linux)");
static $__desc_parent_name_change = array("", "", "owner");
Expand Down
2 changes: 1 addition & 1 deletion kloxo/httpdocs/lib/sgbl.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function __construct()
$this->__var_program_name = 'kloxo';
$this->__ver_major = "6";
$this->__ver_minor = "1";
$this->__ver_release = "14";
$this->__ver_release = "15";
$this->__ver_enterprise = "Single Server Edition";
$this->__ver_type = "production";
$this->__ver_extra = "Stable";
Expand Down
2 changes: 1 addition & 1 deletion kloxo/httpdocs/sql/full.lxsql
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $gl_sql_string = <<<SQL
#mailaccount #lxclient maildisk_usage autoresponder_num
#mmail #mailaccount mailaccount_num mailinglist_num
#uuser disk_usage #lxclient
#web totaldisk_usage ssl_flag #rubyrails #uuser ftpuser_num frontpage_flag php_manage_flag inc_flag awstats_flag installapp_flag modperl_flag cgi_flag php_flag phpunsafe_flag subweb_a_num dotnet_flag cron_num cron_minute_flag cron_manage_flag phpfcgi_flag rubyrails_num phpfcgiprocess_num
#web totaldisk_usage ssl_flag #rubyrails #uuser ftpuser_num frontpage_flag php_manage_flag inc_flag awstats_flag installapp_flag modperl_flag cgi_flag php_flag phpunsafe_flag subweb_a_num dotnet_flag cron_num cron_minute_flag cron_manage_flag cron_shell_flag phpfcgi_flag rubyrails_num phpfcgiprocess_num
#lxbackup backupschedule_flag
#domain traffic_usage #web #mmail #mysqldb #mssqldb #lxbackup traffic_last_usage backup_flag dns_manage_flag mysqldb_num mssqldb_num ftpuser_num addondomain_num
#client pserver_num client_num maindomain_num domain_num subdomain_num clientdisk_usage domain_add_flag can_change_limit_flag can_set_disabled_flag can_change_password_flag document_root_flag runstats_flag #domain webhosting_flag
Expand Down

0 comments on commit 2800d23

Please sign in to comment.