Skip to content

Commit c653844

Browse files
author
Till Brehm
committed
Fixed: FS#3564 - shell users accounts are not removed.
1 parent 4f1e6a2 commit c653844

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

server/plugins-available/shelluser_base_plugin.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ function delete($event_name, $data) {
231231
if($userid > $this->min_uid) {
232232
// We delete only non jailkit users, jailkit users will be deleted by the jailkit plugin.
233233
if ($data['old']['chroot'] != "jailkit") {
234-
$command = 'userdel -f';
234+
$command = 'killall -u '.escapeshellcmd($data['old']['username']).' ; userdel -f';
235235
$command .= ' '.escapeshellcmd($data['old']['username']).' &> /dev/null';
236236
exec($command);
237237
$app->log("Deleted shelluser: ".$data['old']['username'], LOGLEVEL_DEBUG);

server/plugins-available/shelluser_jailkit_plugin.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ function delete($event_name, $data) {
226226
$app->system->web_folder_protection($web['document_root'], false);
227227

228228
if(@is_dir($data['old']['dir'].$jailkit_chroot_userhome)) {
229-
$command = 'userdel -f';
229+
$command = 'killall -u '.escapeshellcmd($data['old']['username']).' ; userdel -f';
230230
$command .= ' '.escapeshellcmd($data['old']['username']).' &> /dev/null';
231231
exec($command);
232232
$app->log("Jailkit Plugin -> delete chroot home:".$data['old']['dir'].$jailkit_chroot_userhome, LOGLEVEL_DEBUG);

0 commit comments

Comments
 (0)