From b71df9b3ce08f7e6083afec3d1524ff96c91bbae Mon Sep 17 00:00:00 2001
From: redray <redray@ispconfig3>
Date: Sun, 08 Mar 2009 06:02:12 -0400
Subject: [PATCH] fixed myDns database bug http://www.howtoforge.com/forums/showthread.php?t=32237
---
server/plugins-available/shelluser_base_plugin.inc.php | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php
index bf834c7..85a6156 100755
--- a/server/plugins-available/shelluser_base_plugin.inc.php
+++ b/server/plugins-available/shelluser_base_plugin.inc.php
@@ -87,6 +87,13 @@
exec($command);
$app->log("Added shelluser: ".$data['new']['username'],LOGLEVEL_DEBUG);
+
+ //* Disable shell user temporarily if we use jailkit
+ if($data['new']['chroot'] == 'jailkit') {
+ $command = 'usermod --lock '.escapeshellcmd($data['new']['username']);
+ exec($command);
+ $app->log("Disabling shelluser temporarily: ".$data['new']['username'],LOGLEVEL_DEBUG);
+ }
} else {
$app->log("UID = $uid for shelluser:".$data['new']['username']." not allowed.",LOGLEVEL_ERROR);
@@ -141,7 +148,7 @@
// Get the UID of the user
$userid = intval($app->system->getuid($data['old']['username']));
if($userid > $this->min_uid) {
- $command = 'userdel';
+ $command = 'userdel --force';
$command .= ' '.escapeshellcmd($data['old']['username']);
exec($command);
--
Gitblit v1.9.1