]> git.proxmox.com Git - qemu-server.git/commitdiff
api/resume: make nocheck root-only
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 27 Apr 2020 07:19:13 +0000 (09:19 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 27 Apr 2020 11:07:54 +0000 (13:07 +0200)
this is only used for migration via 'qm mtunnel', regular users should
never need to resume a VM that does not logically belong to the node it
is running on

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
PVE/API2/Qemu.pm

index ec4c18cde6e04810e5ef7acd87e3bd0cb90737ba..7ffc5381f085f0f944331377113c1517c1b42124 100644 (file)
@@ -2589,6 +2589,8 @@ __PACKAGE__->register_method({
            if $skiplock && $authuser ne 'root@pam';
 
        my $nocheck = extract_param($param, 'nocheck');
+       raise_param_exc({ nocheck => "Only root may use this option." })
+           if $nocheck && $authuser ne 'root@pam';
 
        my $to_disk_suspended;
        eval {