Skip to content
Snippets Groups Projects
Commit be08cdeb authored by Till Brehm's avatar Till Brehm
Browse files

Fixed: Issue #3991 hailed users dont get removed correctly from /etc/passwd

parent ebcb3bc7
No related branches found
No related tags found
Loading
...@@ -245,13 +245,14 @@ class shelluser_jailkit_plugin { ...@@ -245,13 +245,14 @@ class shelluser_jailkit_plugin {
//exec('rm -rf '.$data['old']['dir'].$jailkit_chroot_userhome); //exec('rm -rf '.$data['old']['dir'].$jailkit_chroot_userhome);
$app->system->web_folder_protection($web['document_root'], false); $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)) { 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']); $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); $app->log("Jailkit Plugin -> delete chroot home:".$data['old']['dir'].$jailkit_chroot_userhome, LOGLEVEL_DEBUG);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment