From c1fcaed2ee8f05a5030fe4e8e211ca4eae7a9489 Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Tue, 11 Jun 2013 11:44:57 -0400
Subject: [PATCH] - Fixed FS#2921 - RBL list field in server config can not be empty.
---
server/plugins-available/shelluser_jailkit_plugin.inc.php | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/server/plugins-available/shelluser_jailkit_plugin.inc.php b/server/plugins-available/shelluser_jailkit_plugin.inc.php
index c465b71..268df9c 100755
--- a/server/plugins-available/shelluser_jailkit_plugin.inc.php
+++ b/server/plugins-available/shelluser_jailkit_plugin.inc.php
@@ -104,7 +104,7 @@
$app->system->usermod($data['new']['username'], 0, 0, '', '/usr/sbin/jk_chrootsh', '', '');
//* Unlock user
- $command = 'usermod -U '.escapeshellcmd($data['new']['username']);
+ $command = 'usermod -U '.escapeshellcmd($data['new']['username']).' 2>/dev/null';
exec($command);
$this->_update_website_security_level();
@@ -188,7 +188,7 @@
if(@is_dir($data['old']['dir'].$jailkit_chroot_userhome)) {
$command = 'userdel -f';
- $command .= ' '.escapeshellcmd($data['old']['username']);
+ $command .= ' '.escapeshellcmd($data['old']['username']).' &> /dev/null';
exec($command);
$app->log("Jailkit Plugin -> delete chroot home:".$data['old']['dir'].$jailkit_chroot_userhome,LOGLEVEL_DEBUG);
}
@@ -212,7 +212,7 @@
$command = '/usr/local/ispconfig/server/scripts/create_jailkit_chroot.sh';
$command .= ' '.escapeshellcmd($this->data['new']['dir']);
$command .= ' \''.$this->jailkit_config['jailkit_chroot_app_sections'].'\'';
- exec($command);
+ exec($command.' 2>/dev/null');
$this->app->log("Added jailkit chroot with command: ".$command,LOGLEVEL_DEBUG);
@@ -258,7 +258,7 @@
$command = '/usr/local/ispconfig/server/scripts/create_jailkit_programs.sh';
$command .= ' '.escapeshellcmd($this->data['new']['dir']);
$command .= ' \''.$this->jailkit_config['jailkit_chroot_app_programs'].'\'';
- exec($command);
+ exec($command.' 2>/dev/null');
$this->app->log("Added programs to jailkit chroot with command: ".$command,LOGLEVEL_DEBUG);
}
@@ -290,7 +290,7 @@
$command .= ' '.escapeshellcmd($this->data['new']['shell']);
$command .= ' '.$this->data['new']['puser'];
$command .= ' '.$jailkit_chroot_puserhome;
- exec($command);
+ exec($command.' 2>/dev/null');
//* Change the homedir of the shell user and parent user
//* We have to do this manually as the usermod command fails
--
Gitblit v1.9.1