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

Fix for FS#3857 .ssh key directory problem.

parent 5af0cfd9
No related branches found
No related tags found
No related merge requests found
...@@ -402,6 +402,12 @@ class shelluser_base_plugin { ...@@ -402,6 +402,12 @@ class shelluser_base_plugin {
} }
$sshrsa = trim($sshrsa); $sshrsa = trim($sshrsa);
$usrdir = escapeshellcmd($this->data['new']['dir']); $usrdir = escapeshellcmd($this->data['new']['dir']);
//* Home directory of the new shell user
if($this->data['new']['chroot'] == 'jailkit') {
$usrdir = escapeshellcmd($this->data['new']['dir']);
} else {
$usrdir = escapeshellcmd($this->data['new']['dir'].'/home/'.$data['new']['username']);
}
$sshdir = $usrdir.'/.ssh'; $sshdir = $usrdir.'/.ssh';
$sshkeys= $usrdir.'/.ssh/authorized_keys'; $sshkeys= $usrdir.'/.ssh/authorized_keys';
......
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