Commit 8d3466b0 authored by Marius Cramer's avatar Marius Cramer

- backported patches

parent 6f6aa983
......@@ -183,7 +183,7 @@ $conf['jailkit']['installed'] = false; // will be detected automatically during
$conf['jailkit']['config_dir'] = '/etc/jailkit';
$conf['jailkit']['jk_init'] = 'jk_init.ini';
$conf['jailkit']['jk_chrootsh'] = 'jk_chrootsh.ini';
$conf['jailkit']['jailkit_chroot_app_programs'] = '/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/lesspipe /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico';
$conf['jailkit']['jailkit_chroot_app_programs'] = '/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/lesspipe /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico /usr/bin/mysql /usr/bin/mysqldump /usr/bin/git /usr/bin/git-receive-pack /usr/bin/git-upload-pack /usr/bin/unzip /usr/bin/zip /bin/tar /bin/rm /usr/bin/patch';
$conf['jailkit']['jailkit_chroot_cron_programs'] = '/usr/bin/php /usr/bin/perl /usr/share/perl /usr/share/php';
//* Squid
......
......@@ -183,7 +183,7 @@ $conf['jailkit']['installed'] = false; // will be detected automatically during
$conf['jailkit']['config_dir'] = '/etc/jailkit';
$conf['jailkit']['jk_init'] = 'jk_init.ini';
$conf['jailkit']['jk_chrootsh'] = 'jk_chrootsh.ini';
$conf['jailkit']['jailkit_chroot_app_programs'] = '/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/lesspipe /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico';
$conf['jailkit']['jailkit_chroot_app_programs'] = '/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/lesspipe /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico /usr/bin/mysql /usr/bin/mysqldump /usr/bin/git /usr/bin/git-receive-pack /usr/bin/git-upload-pack /usr/bin/unzip /usr/bin/zip /bin/tar /bin/rm /usr/bin/patch';
$conf['jailkit']['jailkit_chroot_cron_programs'] = '/usr/bin/php /usr/bin/perl /usr/share/perl /usr/share/php';
//* Squid
......
......@@ -129,7 +129,7 @@ fastcgi_config_syntax=1
[jailkit]
jailkit_chroot_home=/home/[username]
jailkit_chroot_app_sections=basicshell editors extendedshell netutils ssh sftp scp groups jk_lsh
jailkit_chroot_app_programs=/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/lesspipe /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico
jailkit_chroot_app_programs=/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/lesspipe /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico /usr/bin/mysql /usr/bin/mysqldump /usr/bin/git /usr/bin/git-receive-pack /usr/bin/git-upload-pack /usr/bin/unzip /usr/bin/zip /bin/tar /bin/rm /usr/bin/patch
jailkit_chroot_cron_programs=/usr/bin/php /usr/bin/perl /usr/share/perl /usr/share/php
[vlogger]
......
......@@ -55,7 +55,9 @@ class db extends mysqli
private $autoCommit = 1; // Autocommit Transactions
private $currentRow; // current row number
private $errorNumber = 0; // last error number
*/
public $errorMessage = ''; // last error message
/*
private $errorLocation = '';// last error location
private $isConnected = false; // needed to know if we have a valid mysqli object from the constructor
////
......@@ -503,6 +505,7 @@ class db extends mysqli
$mysql_error = (is_object($this->_iConnId) ? mysqli_error($this->_iConnId) : mysqli_connect_error());
$mysql_errno = (is_object($this->_iConnId) ? mysqli_errno($this->_iConnId) : mysqli_connect_errno());
$this->errorMessage = $mysql_error;
//$sAddMsg .= getDebugBacktrace();
......
......@@ -55,7 +55,9 @@ class db extends mysqli
private $autoCommit = 1; // Autocommit Transactions
private $currentRow; // current row number
public $errorNumber = 0; // last error number
*/
public $errorMessage = ''; // last error message
/*
private $errorLocation = '';// last error location
private $isConnected = false; // needed to know if we have a valid mysqli object from the constructor
////
......@@ -467,6 +469,7 @@ class db extends mysqli
$mysql_error = (is_object($this->_iConnId) ? mysqli_error($this->_iConnId) : mysqli_connect_error());
$mysql_errno = (is_object($this->_iConnId) ? mysqli_errno($this->_iConnId) : mysqli_connect_errno());
$this->errorMessage = $mysql_error;
//$sAddMsg .= getDebugBacktrace();
......
......@@ -325,7 +325,7 @@ class mail_plugin_dkim {
$this->remove_dkim_key($mail_config['dkim_path']."/".$data['new']['domain'], $data['new']['domain']);
}
} else {
$app->log('Error saving the DKIM Private-key for '.$data['new']['domain'].' - DKIM is not enabled for the domain.', LOGLEVEL_ERROR);
$app->log('Error saving the DKIM Private-key for '.$data['new']['domain'].' - DKIM is not enabled for the domain.', LOGLEVEL_DEBUG);
}
}
}
......@@ -369,45 +369,47 @@ class mail_plugin_dkim {
*/
function domain_dkim_update($event_name, $data) {
global $app;
if ($this->check_system($data)) {
/* maildomain disabled */
if ($data['new']['active'] == 'n' && $data['old']['active'] == 'y' && $data['new']['dkim']=='y') {
$app->log('Maildomain '.$data['new']['domain'].' disabled - remove DKIM-settings', LOGLEVEL_DEBUG);
$this->remove_dkim($data['new']);
}
/* maildomain re-enabled */
if ($data['new']['active'] == 'y' && $data['old']['active'] == 'n' && $data['new']['dkim']=='y')
$this->add_dkim($data);
/* maildomain active - only dkim changes */
if ($data['new']['active'] == 'y' && $data['old']['active'] == 'y') {
/* dkim disabled */
if ($data['new']['dkim'] != $data['old']['dkim'] && $data['new']['dkim'] == 'n') {
if($data['new']['dkim'] == 'y' || $data['old']['dkim'] == 'y'){
if ($this->check_system($data)) {
/* maildomain disabled */
if ($data['new']['active'] == 'n' && $data['old']['active'] == 'y' && $data['new']['dkim']=='y') {
$app->log('Maildomain '.$data['new']['domain'].' disabled - remove DKIM-settings', LOGLEVEL_DEBUG);
$this->remove_dkim($data['new']);
}
/* dkim enabled */
elseif ($data['new']['dkim'] != $data['old']['dkim'] && $data['new']['dkim'] == 'y') {
$this->add_dkim($data);
}
/* new private-key */
if ($data['new']['dkim_private'] != $data['old']['dkim_private'] && $data['new']['dkim'] == 'y') {
$this->add_dkim($data);
}
/* new selector */
if ($data['new']['dkim_selector'] != $data['old']['dkim_selector'] && $data['new']['dkim'] == 'y') {
/* maildomain re-enabled */
if ($data['new']['active'] == 'y' && $data['old']['active'] == 'n' && $data['new']['dkim']=='y')
$this->add_dkim($data);
/* maildomain active - only dkim changes */
if ($data['new']['active'] == 'y' && $data['old']['active'] == 'y') {
/* dkim disabled */
if ($data['new']['dkim'] != $data['old']['dkim'] && $data['new']['dkim'] == 'n') {
$this->remove_dkim($data['new']);
}
/* dkim enabled */
elseif ($data['new']['dkim'] != $data['old']['dkim'] && $data['new']['dkim'] == 'y') {
$this->add_dkim($data);
}
/* new private-key */
if ($data['new']['dkim_private'] != $data['old']['dkim_private'] && $data['new']['dkim'] == 'y') {
$this->add_dkim($data);
}
/* new selector */
if ($data['new']['dkim_selector'] != $data['old']['dkim_selector'] && $data['new']['dkim'] == 'y') {
$this->add_dkim($data);
}
/* new domain-name */
if ($data['new']['domain'] != $data['old']['domain']) {
$this->remove_dkim($data['old']);
$this->add_dkim($data);
}
}
/* new domain-name */
if ($data['new']['domain'] != $data['old']['domain']) {
$this->remove_dkim($data['old']);
/* resync */
if ($data['new']['active'] == 'y' && $data['new'] == $data['old'] && $data['new']['dkim']=='y') {
$this->add_dkim($data);
}
}
/* resync */
if ($data['new']['active'] == 'y' && $data['new'] == $data['old'] && $data['new']['dkim']=='y') {
$this->add_dkim($data);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment