Skip to content

Commit 8394c29

Browse files
committed
Correct condition to use the new variable, #4901
1 parent 74b3b31 commit 8394c29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/plugins-available/shelluser_jailkit_plugin.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ private function _setup_ssh_rsa() {
490490
// add root's key
491491
$app->file->mkdirs($sshdir, '0755');
492492
$authorized_keys_template = $this->jailkit_config['jailkit_chroot_authorized_keys_template'];
493-
if(is_file('/root/.ssh/authorized_keys')) $app->system->file_put_contents($sshkeys, $app->system->file_get_contents($authorized_keys_template));
493+
if(is_file($authorized_keys_template)) $app->system->file_put_contents($sshkeys, $app->system->file_get_contents($authorized_keys_template));
494494

495495
// Remove duplicate keys
496496
$existing_keys = @file($sshkeys, FILE_IGNORE_NEW_LINES);

0 commit comments

Comments
 (0)