From 45b8e41fd93ffdfd67d3d900c77be16ac08f4e82 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Fri, 24 Apr 2009 06:25:11 -0400
Subject: [PATCH] Edited todo file.
---
server/plugins-available/shelluser_base_plugin.inc.php | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php
index 76fdf0e..151dfda 100755
--- a/server/plugins-available/shelluser_base_plugin.inc.php
+++ b/server/plugins-available/shelluser_base_plugin.inc.php
@@ -90,9 +90,9 @@
//* Disable shell user temporarily if we use jailkit
if($data['new']['chroot'] == 'jailkit') {
- $command = 'usermod --lock '.escapeshellcmd($data['new']['username']);
+ $command = 'usermod -L '.escapeshellcmd($data['new']['username']);
exec($command);
- $app->log("Disabling shelluser temporarily: ".$data['new']['username'],LOGLEVEL_DEBUG);
+ $app->log("Disabling shelluser temporarily: ".$command,LOGLEVEL_DEBUG);
}
} else {
@@ -148,11 +148,14 @@
// Get the UID of the user
$userid = intval($app->system->getuid($data['old']['username']));
if($userid > $this->min_uid) {
- $command = 'userdel -f -r';
- $command .= ' '.escapeshellcmd($data['old']['username']);
+ // We delete only non jailkit users, jailkit users will be deleted by the jailkit plugin.
+ if ($data['old']['chroot'] != "jailkit") {
+ $command = 'userdel -f';
+ $command .= ' '.escapeshellcmd($data['old']['username']);
- exec($command);
- $app->log("Deleted shelluser: ".$data['old']['username'],LOGLEVEL_DEBUG);
+ exec($command);
+ $app->log("Deleted shelluser: ".$data['old']['username'],LOGLEVEL_DEBUG);
+ }
} else {
$app->log("UID = $userid for shelluser:".$data['old']['username']." not allowed.",LOGLEVEL_ERROR);
--
Gitblit v1.9.1