Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Zvonimir
ISPConfig 3
Commits
54f1581b
Commit
54f1581b
authored
Sep 11, 2012
by
mcramer
Browse files
Fixed: FS#2314 - Reseller creation in remote API does not work properly (id_rsa and ssh_rsa)
parent
4e18bd42
Changes
1
Hide whitespace changes
Inline
Side-by-side
interface/lib/classes/remoting.inc.php
View file @
54f1581b
...
...
@@ -2651,6 +2651,12 @@ class remoting {
}
*/
/* copied from the client_edit php */
exec
(
'ssh-keygen -t rsa -C '
.
$username
.
'-rsa-key-'
.
time
()
.
' -f /tmp/id_rsa -N ""'
);
$app
->
db
->
query
(
"UPDATE client SET created_at = "
.
time
()
.
", id_rsa = '"
.
$app
->
db
->
quote
(
@
file_get_contents
(
'/tmp/id_rsa'
))
.
"', ssh_rsa = '"
.
$app
->
db
->
quote
(
@
file_get_contents
(
'/tmp/id_rsa.pub'
))
.
"' WHERE client_id = "
.
$this
->
id
);
exec
(
'rm -f /tmp/id_rsa /tmp/id_rsa.pub'
);
//$app->uses('tform');
//* Save changes to Datalog
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment