[pve-devel] [PATCH RFC container] fix #1225: restore without config changes for VMUser

Fabian Grünbichler f.gruenbichler at proxmox.com
Thu Dec 15 16:10:55 CET 2016


this makes the behaviour similar to VM restore operations

Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
 src/PVE/API2/LXC.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index 423c90e..cb8df4a 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -218,13 +218,13 @@ __PACKAGE__->register_method({
 	    raise_perm_exc();
 	}
 
-	PVE::LXC::check_ct_modify_config_perm($rpcenv, $authuser, $vmid, $pool, $param, []);
-
+	my $ostemplate = extract_param($param, 'ostemplate');
 	my $storage = extract_param($param, 'storage') // 'local';
 
+	PVE::LXC::check_ct_modify_config_perm($rpcenv, $authuser, $vmid, $pool, $param, []);
+
 	my $storage_cfg = cfs_read_file("storage.cfg");
 
-	my $ostemplate = extract_param($param, 'ostemplate');
 
 	my $archive;
 
-- 
2.1.4





More information about the pve-devel mailing list