tbrehm
2009-03-31 ac32a4435e9d3c5e09bfbcfd39ba70eba6efddf6
Improved user delete code for non jailkit users.
1 files modified
11 ■■■■■ changed files
server/plugins-available/shelluser_base_plugin.inc.php 11 ●●●●● patch | view | raw | blame | history
server/plugins-available/shelluser_base_plugin.inc.php
@@ -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';
                $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);