]> git.proxmox.com Git - qemu-server.git/blobdiff - PVE/CLI/qm.pm
qm: assume correct VNC setup in 'vncproxy', disallow passwordless
[qemu-server.git] / PVE / CLI / qm.pm
index f8972bd325f7e7004cb91d4b7b099a8465f0f7e2..1c199b6d273df68933722ac0eaf4ab62b3daf6b2 100755 (executable)
@@ -217,12 +217,10 @@ __PACKAGE__->register_method ({
        my $vnc_socket = PVE::QemuServer::Helpers::vnc_socket($vmid);
 
        if (my $ticket = $ENV{LC_PVE_TICKET}) {  # NOTE: ssh on debian only pass LC_* variables
-           mon_cmd($vmid, "change", device => 'vnc', target => "unix:$vnc_socket,password");
            mon_cmd($vmid, "set_password", protocol => 'vnc', password => $ticket);
            mon_cmd($vmid, "expire_password", protocol => 'vnc', time => "+30");
        } else {
-           # FIXME: remove or allow to add tls-creds object, as x509 vnc param is removed with qemu 4??
-           mon_cmd($vmid, "change", device => 'vnc', target => "unix:$vnc_socket,password");
+           die "LC_PVE_TICKET not set, VNC proxy without password is forbidden\n";
        }
 
        run_vnc_proxy($vnc_socket);