| | |
| | | //* $plugin_name and $class_name have to be the same then the name of this class |
| | | var $plugin_name = 'shelluser_jailkit_plugin'; |
| | | var $class_name = 'shelluser_jailkit_plugin'; |
| | | var $min_uid = 499; |
| | | |
| | | //* This function is called during ispconfig installation to determine |
| | | // if a symlink shall be created for this plugin. |
| | |
| | | $app->uses('system'); |
| | | $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$data['new']['parent_domain_id']); |
| | | |
| | | if($app->system->is_user($data['new']['puser'])) { |
| | | // Get the UID of the parent user |
| | | $uid = intval($app->system->getuid($data['new']['puser'])); |
| | | if($uid > $this->min_uid) { |
| | | |
| | | if($app->system->is_user($data['new']['username'])) { |
| | | |
| | | /** |
| | | * Setup Jailkit Chroot System If Enabled |
| | | */ |
| | | |
| | | |
| | | if ($data['new']['chroot'] == "jailkit") |
| | | { |
| | |
| | | } else { |
| | | $app->log("Jailkit Plugin -> insert username:".$data['new']['username']." skipped, the user does not exist.", LOGLEVEL_WARN); |
| | | } |
| | | } else { |
| | | $app->log("UID = $uid for shelluser:".$data['new']['username']." not allowed.", LOGLEVEL_ERROR); |
| | | } |
| | | } else { |
| | | $app->log("Skipping insertion of user:".$data['new']['username'].", parent user ".$data['new']['puser']." does not exist.", LOGLEVEL_WARN); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | $app->uses('system'); |
| | | $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$data['new']['parent_domain_id']); |
| | | |
| | | if($app->system->is_user($data['new']['puser'])) { |
| | | // Get the UID of the parent user |
| | | $uid = intval($app->system->getuid($data['new']['puser'])); |
| | | if($uid > $this->min_uid) { |
| | | |
| | | |
| | | if($app->system->is_user($data['new']['username'])) { |
| | | |
| | | |
| | | |
| | | /** |
| | | * Setup Jailkit Chroot System If Enabled |
| | |
| | | } else { |
| | | $app->log("Jailkit Plugin -> update username:".$data['new']['username']." skipped, the user does not exist.", LOGLEVEL_WARN); |
| | | } |
| | | } else { |
| | | $app->log("UID = $uid for shelluser:".$data['new']['username']." not allowed.", LOGLEVEL_ERROR); |
| | | } |
| | | } else { |
| | | $app->log("Skipping update for user:".$data['new']['username'].", parent user ".$data['new']['puser']." does not exist.", LOGLEVEL_WARN); |
| | | } |
| | | |
| | | } |
| | | |