From e61ed86fe51c5a0300d867a33f50711dbf6b4fe0 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Wed, 11 Jan 2012 11:59:56 -0500
Subject: [PATCH] - Force user deletion for jailkit users - Fixed bug in updater that made ispconfig invoices directory unreadable. - Removed passing of variables by reference in ispconfig monitor. - Changed monitor of opensuse updates so that the command does not install them automatically.
---
install/lib/installer_base.lib.php | 2 +-
server/lib/classes/monitor_tools.inc.php | 2 +-
install/dist/lib/fedora.lib.php | 2 +-
server/plugins-available/shelluser_jailkit_plugin.inc.php | 2 +-
install/dist/lib/gentoo.lib.php | 2 +-
install/dist/lib/opensuse.lib.php | 2 +-
interface/web/monitor/show_sys_state.php | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php
index f6e1511..a3da18a 100644
--- a/install/dist/lib/fedora.lib.php
+++ b/install/dist/lib/fedora.lib.php
@@ -1031,7 +1031,7 @@
// Edit the file Edit the file /etc/sudoers and comment out the requiregetty line, otherwise the backup function will fail
replaceLine('/etc/sudoers','Defaults requiretty','#Defaults requiretty',0,0);
- if(is_file($install_dir.'/interface/invoices')) {
+ if(is_dir($install_dir.'/interface/invoices')) {
chmod($install_dir.'/interface/invoices', 0770);
chown($install_dir.'/interface/invoices', 'ispconfig');
chgrp($install_dir.'/interface/invoices', 'ispconfig');
diff --git a/install/dist/lib/gentoo.lib.php b/install/dist/lib/gentoo.lib.php
index 7a6770b..5b9d5bf 100644
--- a/install/dist/lib/gentoo.lib.php
+++ b/install/dist/lib/gentoo.lib.php
@@ -867,7 +867,7 @@
chgrp($install_dir.'/server/lib/mysql_clientdb.conf', 'root');
}
- if(is_file($install_dir.'/interface/invoices')) {
+ if(is_dir($install_dir.'/interface/invoices')) {
chmod($install_dir.'/interface/invoices', 0770);
chown($install_dir.'/interface/invoices', 'ispconfig');
chgrp($install_dir.'/interface/invoices', 'ispconfig');
diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php
index 91fca27..7b51cac 100644
--- a/install/dist/lib/opensuse.lib.php
+++ b/install/dist/lib/opensuse.lib.php
@@ -1062,7 +1062,7 @@
exec('chmod 744 /usr/local/bin/run-getmail.sh');
}
- if(is_file($install_dir.'/interface/invoices')) {
+ if(is_dir($install_dir.'/interface/invoices')) {
chmod($install_dir.'/interface/invoices', 0770);
chown($install_dir.'/interface/invoices', 'ispconfig');
chgrp($install_dir.'/interface/invoices', 'ispconfig');
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 4a6e8a6..92c6ad0 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1750,7 +1750,7 @@
chgrp($install_dir.'/server/lib/mysql_clientdb.conf', 'root');
}
- if(is_file($install_dir.'/interface/invoices')) {
+ if(is_dir($install_dir.'/interface/invoices')) {
chmod($install_dir.'/interface/invoices', 0770);
chown($install_dir.'/interface/invoices', 'ispconfig');
chgrp($install_dir.'/interface/invoices', 'ispconfig');
diff --git a/interface/web/monitor/show_sys_state.php b/interface/web/monitor/show_sys_state.php
index 88fa3c9..20f0b05 100644
--- a/interface/web/monitor/show_sys_state.php
+++ b/interface/web/monitor/show_sys_state.php
@@ -196,7 +196,7 @@
$ispcData = null;
foreach($records as $record) {
/* get the state from the db-data */
- _processDbState($record['type'], $serverId, &$serverState, &$messages);
+ _processDbState($record['type'], $serverId, $serverState, $messages);
/* if we have the os-info, get it */
if ($record['type'] == 'os_info') {
$osData = unserialize($record['data']);
diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php
index c67cfef..00b9759 100644
--- a/server/lib/classes/monitor_tools.inc.php
+++ b/server/lib/classes/monitor_tools.inc.php
@@ -879,7 +879,7 @@
/*
* Fetch the output
*/
- $data['output'] = shell_exec('zypper --non-interactive up');
+ $data['output'] = shell_exec('zypper lu');
} else {
/*
* It is not Debian/Ubuntu, so there is no data and no state
diff --git a/server/plugins-available/shelluser_jailkit_plugin.inc.php b/server/plugins-available/shelluser_jailkit_plugin.inc.php
index fe91c83..86e92f6 100755
--- a/server/plugins-available/shelluser_jailkit_plugin.inc.php
+++ b/server/plugins-available/shelluser_jailkit_plugin.inc.php
@@ -166,7 +166,7 @@
//exec('rm -rf '.$data['old']['dir'].$jailkit_chroot_userhome);
if(@is_dir($data['old']['dir'].$jailkit_chroot_userhome)) {
- $command = 'userdel';
+ $command = 'userdel -f';
$command .= ' '.escapeshellcmd($data['old']['username']);
exec($command);
$app->log("Jailkit Plugin -> delete chroot home:".$data['old']['dir'].$jailkit_chroot_userhome,LOGLEVEL_DEBUG);
--
Gitblit v1.9.1