From be08cdebf7c631f0f851824bb0d7df69d6711bfa Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Thu, 30 Jun 2016 13:26:08 -0400
Subject: [PATCH] Fixed: Issue #3991 hailed users dont get removed correctly from /etc/passwd
---
server/plugins-available/shelluser_jailkit_plugin.inc.php | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/server/plugins-available/shelluser_jailkit_plugin.inc.php b/server/plugins-available/shelluser_jailkit_plugin.inc.php
index 5645953..184a8ca 100755
--- a/server/plugins-available/shelluser_jailkit_plugin.inc.php
+++ b/server/plugins-available/shelluser_jailkit_plugin.inc.php
@@ -245,13 +245,14 @@
//exec('rm -rf '.$data['old']['dir'].$jailkit_chroot_userhome);
$app->system->web_folder_protection($web['document_root'], false);
+
+ $userid = intval($app->system->getuid($data['old']['username']));
+ $command = 'killall -u '.escapeshellcmd($data['old']['username']).' ; ';
+ $command .= 'userdel -f '.escapeshellcmd($data['old']['username']).' &> /dev/null';
+ exec($command);
+
if(@is_dir($data['old']['dir'].$jailkit_chroot_userhome)) {
- $userid = intval($app->system->getuid($data['old']['username']));
- $command = 'killall -u '.escapeshellcmd($data['old']['username']).' ; userdel -f';
- $command .= ' '.escapeshellcmd($data['old']['username']).' &> /dev/null';
- exec($command);
-
$this->_delete_homedir($data['old']['dir'].$jailkit_chroot_userhome,$userid,$data['old']['parent_domain_id']);
$app->log("Jailkit Plugin -> delete chroot home:".$data['old']['dir'].$jailkit_chroot_userhome, LOGLEVEL_DEBUG);
--
Gitblit v1.9.1