From b4aaf3eedda4001ad5e01ac2c19494020148a77c Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Thu, 08 Sep 2011 10:57:26 -0400
Subject: [PATCH] Fixed: FS#1579 - Add Exim config files for centos to config file folder.
---
server/plugins-available/shelluser_jailkit_plugin.inc.php | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/server/plugins-available/shelluser_jailkit_plugin.inc.php b/server/plugins-available/shelluser_jailkit_plugin.inc.php
index 050ec00..31db30f 100755
--- a/server/plugins-available/shelluser_jailkit_plugin.inc.php
+++ b/server/plugins-available/shelluser_jailkit_plugin.inc.php
@@ -94,7 +94,7 @@
// call the ssh-rsa update function
$this->_setup_ssh_rsa();
- $command .= 'usermod -U '.escapeshellcmd($data['new']['username']);
+ $command .= 'usermod -s /usr/sbin/jk_chrootsh -U '.escapeshellcmd($data['new']['username']);
exec($command);
$this->_update_website_security_level();
@@ -366,11 +366,11 @@
private function _setup_ssh_rsa() {
$this->app->log("ssh-rsa setup shelluser_jailkit",LOGLEVEL_DEBUG);
// Get the client ID, username, and the key
- $domain_data = $this->app->dbmaster->queryOneRecord('SELECT sys_groupid FROM web_domain WHERE web_domain.domain_id = '.intval($this->data['new']['parent_domain_id']));
- $sys_group_data = $this->app->dbmaster->queryOneRecord('SELECT * FROM sys_group WHERE sys_group.groupid = '.intval($domain_data['sys_groupid']));
+ $domain_data = $this->app->db->queryOneRecord('SELECT sys_groupid FROM web_domain WHERE web_domain.domain_id = '.intval($this->data['new']['parent_domain_id']));
+ $sys_group_data = $this->app->db->queryOneRecord('SELECT * FROM sys_group WHERE sys_group.groupid = '.intval($domain_data['sys_groupid']));
$id = intval($sys_group_data['client_id']);
$username= $sys_group_data['name'];
- $client_data = $this->app->dbmaster->queryOneRecord('SELECT * FROM client WHERE client.client_id = '.$id);
+ $client_data = $this->app->db->queryOneRecord('SELECT * FROM client WHERE client.client_id = '.$id);
$userkey = $client_data['ssh_rsa'];
unset($domain_data);
unset($client_data);
@@ -387,7 +387,7 @@
//Generate ssh-rsa-keys
exec('ssh-keygen -t rsa -C '.$username.'-rsa-key-'.time().' -f /tmp/id_rsa -N ""');
// save keypair in client table
- $this->app->dbmaster->query("UPDATE client SET created_at = ".time().", id_rsa = '".file_get_contents('/tmp/id_rsa')."', ssh_rsa = '".file_get_contents('/tmp/id_rsa.pub')."' WHERE client_id = ".$id);
+ $this->app->db->query("UPDATE client SET created_at = ".time().", id_rsa = '".file_get_contents('/tmp/id_rsa')."', ssh_rsa = '".file_get_contents('/tmp/id_rsa.pub')."' WHERE client_id = ".$id);
// and use the public key that has been generated
$userkey = file_get_contents('/tmp/id_rsa.pub')
;
--
Gitblit v1.9.1