Skip to content

Commit 0ba284c

Browse files
author
Till Brehm
committed
Merge branch 'update_jailkit' into 'develop'
jail cleanup and updates Closes #5736, #2946, #4878, #5028, and #2140 See merge request ispconfig/ispconfig3!1120
2 parents 47e924c + b930b43 commit 0ba284c

File tree

70 files changed

+1920
-184
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+1920
-184
lines changed

install/lib/installer_base.lib.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ class installer_base {
3333
var $wb = array();
3434
var $language = 'en';
3535
var $db;
36-
public $conf;
3736
public $install_ispconfig_interface = true;
3837
public $is_update = false; // true if it is an update, falsi if it is a new install
3938
public $min_php = '5.3.3'; // minimal php-version for update / install
@@ -42,7 +41,6 @@ class installer_base {
4241

4342
public function __construct() {
4443
global $conf; //TODO: maybe $conf should be passed to constructor
45-
//$this->conf = $conf;
4644
}
4745

4846
//: TODO Implement the translation function and language files for the installer.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ALTER TABLE `web_domain` ADD `jailkit_chroot_app_sections` mediumtext NULL DEFAULT NULL;
2+
ALTER TABLE `web_domain` ADD `jailkit_chroot_app_programs` mediumtext NULL DEFAULT NULL;
3+
ALTER TABLE `web_domain` ADD `delete_unused_jailkit` enum('n','y') NOT NULL DEFAULT 'n';
4+
ALTER TABLE `web_domain` ADD `last_jailkit_update` date NULL DEFAULT NULL;
5+
ALTER TABLE `web_domain` ADD `last_jailkit_hash` varchar(255) DEFAULT NULL;

install/sql/ispconfig3.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2084,6 +2084,11 @@ CREATE TABLE `web_domain` (
20842084
`log_retention` int(11) NOT NULL DEFAULT '10',
20852085
`proxy_protocol` enum('n','y') NOT NULL default 'n',
20862086
`server_php_id` INT(11) UNSIGNED NOT NULL DEFAULT 0,
2087+
`jailkit_chroot_app_sections` mediumtext NULL DEFAULT NULL,
2088+
`jailkit_chroot_app_programs` mediumtext NULL DEFAULT NULL,
2089+
`delete_unused_jailkit` enum('n','y') NOT NULL default 'n',
2090+
`last_jailkit_update` date NULL DEFAULT NULL,
2091+
`last_jailkit_hash` varchar(255) DEFAULT NULL,
20872092
PRIMARY KEY (`domain_id`),
20882093
UNIQUE KEY `serverdomain` ( `server_id` , `ip_address`, `domain` )
20892094
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

install/tpl/server.ini.master

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ jailkit_chroot_app_sections=basicshell editors extendedshell netutils ssh sftp s
146146
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 /usr/bin/which /usr/lib/x86_64-linux-gnu/libmemcached.so.11 /usr/lib/x86_64-linux-gnu/libmemcachedutil.so.2 /usr/lib/x86_64-linux-gnu/libMagickWand-6.Q16.so.2 /opt/php-5.6.8/bin/php /opt/php-5.6.8/include /opt/php-5.6.8/lib
147147
jailkit_chroot_cron_programs=/usr/bin/php /usr/bin/perl /usr/share/perl /usr/share/php
148148
jailkit_chroot_authorized_keys_template=/root/.ssh/authorized_keys
149+
jailkit_hardlinks=allow
149150

150151
[vlogger]
151152
config_dir=/etc

interface/lib/classes/remoting.inc.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,6 @@ public function __construct($methods = array())
5959
$app->uses('remoting_lib');
6060

6161
$this->_methods = $methods;
62-
63-
/*
64-
$this->app = $app;
65-
$this->conf = $conf;
66-
*/
6762
}
6863

6964
//* remote login function

interface/web/admin/form/server_config.tform.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1845,6 +1845,16 @@
18451845
'width' => '40',
18461846
'maxlength' => '1000'
18471847
),
1848+
'jailkit_hardlinks' => array(
1849+
'datatype' => 'VARCHAR',
1850+
'formtype' => 'SELECT',
1851+
'default' => 'allow',
1852+
'value' => array(
1853+
'allow' => 'jailkit_hardlinks_allow_txt',
1854+
'no' => 'jailkit_hardlinks_no_txt',
1855+
'yes' => 'jailkit_hardlinks_yes_txt',
1856+
)
1857+
),
18481858
//#################################
18491859
// END Datatable fields
18501860
//#################################

interface/web/admin/lib/lang/ar_server_config.lng

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,4 +320,8 @@ $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
320320
$wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
321321
$wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys template';
322322
$wb['jailkit_chroot_authorized_keys_template_error_regex'] = 'Invalid jaikit chroot authorized_keys template file.';
323-
?>
323+
$wb['jailkit_hardlinks_txt'] = 'Hardlinks within Jailkit chroot';
324+
$wb['tooltip_jailkit_hardlinks_txt'] = 'Using hardlinks is insecure, but saves disk space.';
325+
$wb['jailkit_hardlinks_allow_txt'] = 'Allow hardlinks within the jail';
326+
$wb['jailkit_hardlinks_no_txt'] = 'No, remove hardlinked files';
327+
$wb['jailkit_hardlinks_yes_txt'] = 'Yes, use hardlinks if possible';

interface/web/admin/lib/lang/bg_server_config.lng

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,4 +320,8 @@ $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
320320
$wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
321321
$wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys template';
322322
$wb['jailkit_chroot_authorized_keys_template_error_regex'] = 'Invalid jaikit chroot authorized_keys template file.';
323-
?>
323+
$wb['jailkit_hardlinks_txt'] = 'Hardlinks within Jailkit chroot';
324+
$wb['tooltip_jailkit_hardlinks_txt'] = 'Using hardlinks is insecure, but saves disk space.';
325+
$wb['jailkit_hardlinks_allow_txt'] = 'Allow hardlinks within the jail';
326+
$wb['jailkit_hardlinks_no_txt'] = 'No, remove hardlinked files';
327+
$wb['jailkit_hardlinks_yes_txt'] = 'Yes, use hardlinks if possible';

interface/web/admin/lib/lang/br_server_config.lng

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,3 +321,8 @@ $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
321321
$wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
322322
$wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys template';
323323
$wb['jailkit_chroot_authorized_keys_template_error_regex'] = 'Invalid jaikit chroot authorized_keys template file.';
324+
$wb['jailkit_hardlinks_txt'] = 'Hardlinks within Jailkit chroot';
325+
$wb['tooltip_jailkit_hardlinks_txt'] = 'Using hardlinks is insecure, but saves disk space.';
326+
$wb['jailkit_hardlinks_allow_txt'] = 'Allow hardlinks within the jail';
327+
$wb['jailkit_hardlinks_no_txt'] = 'No, remove hardlinked files';
328+
$wb['jailkit_hardlinks_yes_txt'] = 'Yes, use hardlinks if possible';

interface/web/admin/lib/lang/ca_server_config.lng

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,4 +320,8 @@ $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
320320
$wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
321321
$wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys template';
322322
$wb['jailkit_chroot_authorized_keys_template_error_regex'] = 'Invalid jaikit chroot authorized_keys template file.';
323-
?>
323+
$wb['jailkit_hardlinks_txt'] = 'Hardlinks within Jailkit chroot';
324+
$wb['tooltip_jailkit_hardlinks_txt'] = 'Using hardlinks is insecure, but saves disk space.';
325+
$wb['jailkit_hardlinks_allow_txt'] = 'Allow hardlinks within the jail';
326+
$wb['jailkit_hardlinks_no_txt'] = 'No, remove hardlinked files';
327+
$wb['jailkit_hardlinks_yes_txt'] = 'Yes, use hardlinks if possible';

0 commit comments

Comments
 (0)