[pve-devel] [PATCH pve-container 1/4] lxc: use new disk option names in permission check
Wolfgang Bumiller
w.bumiller at proxmox.com
Thu Sep 17 13:06:57 CEST 2015
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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index fc1500c..8abc21e 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -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']);
--
2.1.4
More information about the pve-devel
mailing list