]> git.proxmox.com Git - pve-container.git/commitdiff
lxc: use new disk option names in permission check
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 17 Sep 2015 11:06:57 +0000 (13:06 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 17 Sep 2015 11:21:04 +0000 (13:21 +0200)
made check_ct_modify_config_perm check VM.Config.Disk for
'rootfs' and 'mp\d+' instead of the old 'disk' option.

src/PVE/LXC.pm

index fc1500c7c6b7c4ac1d9abcec0bf869d230e84922..8abc21e65504ce2dc5f19ee9a8e653efecf026a6 100644 (file)
@@ -1851,7 +1851,7 @@ sub check_ct_modify_config_perm {
 
        if ($opt eq 'cpus' || $opt eq 'cpuunits' || $opt eq 'cpulimit') {
            $rpcenv->check_vm_perm($authuser, $vmid, $pool, ['VM.Config.CPU']);
-       } elsif ($opt eq 'disk') {
+       } elsif ($opt eq 'rootfs' || $opt =~ /^mp\d+$/) {
            $rpcenv->check_vm_perm($authuser, $vmid, $pool, ['VM.Config.Disk']);
        } elsif ($opt eq 'memory' || $opt eq 'swap') {
            $rpcenv->check_vm_perm($authuser, $vmid, $pool, ['VM.Config.Memory']);