Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
pve-manager
Commits
b555d157
Commit
b555d157
authored
Jan 19, 2012
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use new assemble_vnc_ticket
parent
9cc6bd33
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
Nodes.pm
PVE/API2/Nodes.pm
+5
-5
OpenVZ.pm
PVE/API2/OpenVZ.pm
+5
-2
No files found.
PVE/API2/Nodes.pm
View file @
b555d157
...
...
@@ -523,10 +523,12 @@ __PACKAGE__->register_method ({
my
$user
=
$rpcenv
->
get_user
();
my
$ticket
=
PVE::AccessControl::
assemble_ticket
(
$user
);
my
$node
=
$param
->
{
node
};
my
$authpath
=
"
/nodes/
$node
";
my
$ticket
=
PVE::AccessControl::
assemble_vnc_ticket
(
$user
,
$authpath
);
$sslcert
=
PVE::Tools::
file_get_contents
("
/etc/pve/pve-root-ca.pem
",
8192
)
if
!
$sslcert
;
...
...
@@ -547,10 +549,8 @@ __PACKAGE__->register_method ({
my
$timeout
=
10
;
# fixme: do we want to require special auth permissions?
# example "-perm Shell"
my
@cmd
=
('
/usr/bin/vncterm
',
'
-rfbport
',
$port
,
'
-timeout
',
$timeout
,
'
-authpath
',
"
/nodes/
$node
"
,
'
-timeout
',
$timeout
,
'
-authpath
',
$authpath
,
'
-perm
',
'
Sys.Console
',
'
-c
',
@$remcmd
,
@$shcmd
);
my
$realcmd
=
sub
{
...
...
PVE/API2/OpenVZ.pm
View file @
b555d157
...
...
@@ -741,11 +741,14 @@ __PACKAGE__->register_method ({
my
$rpcenv
=
PVE::RPCEnvironment::
get
();
my
$user
=
$rpcenv
->
get_user
();
my
$ticket
=
PVE::AccessControl::
assemble_ticket
(
$user
);
my
$vmid
=
$param
->
{
vmid
};
my
$node
=
$param
->
{
node
};
my
$authpath
=
"
/vms/
$vmid
";
my
$ticket
=
PVE::AccessControl::
assemble_vnc_ticket
(
$user
,
$authpath
);
$sslcert
=
PVE::Tools::
file_get_contents
("
/etc/pve/pve-root-ca.pem
",
8192
)
if
!
$sslcert
;
...
...
@@ -772,7 +775,7 @@ __PACKAGE__->register_method ({
my
$timeout
=
10
;
my
$cmd
=
['
/usr/bin/vncterm
',
'
-rfbport
',
$port
,
'
-timeout
',
$timeout
,
'
-authpath
',
"
/vms/
$vmid
"
,
'
-timeout
',
$timeout
,
'
-authpath
',
$authpath
,
'
-perm
',
'
VM.Console
',
'
-c
',
@$remcmd
,
@$shcmd
];
run_command
(
$cmd
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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