From 1a485fd6abef7a969edbd43cd028e7d351bfdd8a Mon Sep 17 00:00:00 2001
From: Pascal Dreissen <pascal@dreissen.nl>
Date: Tue, 05 Jul 2016 11:09:43 -0400
Subject: [PATCH] Merge branch 'missing_fonts' into 'stable-3.1'
---
server/plugins-available/shelluser_jailkit_plugin.inc.php | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/server/plugins-available/shelluser_jailkit_plugin.inc.php b/server/plugins-available/shelluser_jailkit_plugin.inc.php
index 184a8ca..16dbcc7 100755
--- a/server/plugins-available/shelluser_jailkit_plugin.inc.php
+++ b/server/plugins-available/shelluser_jailkit_plugin.inc.php
@@ -251,6 +251,9 @@
$command .= 'userdel -f '.escapeshellcmd($data['old']['username']).' &> /dev/null';
exec($command);
+ // Remove the jailed user from passwd and shadow file inside the jail
+ $app->system->removeLine($data['old']['dir'].'/etc/passwd', $data['old']['username']);
+ $app->system->removeLine($data['old']['dir'].'/etc/shadow', $data['old']['username']);
if(@is_dir($data['old']['dir'].$jailkit_chroot_userhome)) {
$this->_delete_homedir($data['old']['dir'].$jailkit_chroot_userhome,$userid,$data['old']['parent_domain_id']);
--
Gitblit v1.9.1