]> git.proxmox.com Git - pve-container.git/commitdiff
Revert "Do not skip unprivileged config parameter when restoring a container"
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 27 Dec 2016 07:53:46 +0000 (08:53 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 27 Dec 2016 07:53:46 +0000 (08:53 +0100)
This reverts commit ca187102dfca383a1125106fef744d3ba525023c.

We extract the backup archive before we read the config, so above patch
generates containers with wrong permissions.

src/PVE/LXC/Create.pm

index 11bc00d9e9d6864dda190b0f5f9e5bc1066ae1f8..1f1ece1c98b6ac83920603c72c325652f7df6f6a 100644 (file)
@@ -114,7 +114,7 @@ sub restore_configuration {
        my $oldconf = PVE::LXC::Config::parse_pct_config("/lxc/$vmid.conf", $raw);
 
        foreach my $key (keys %$oldconf) {
-           next if $key eq 'digest' || $key eq 'rootfs' || $key eq 'snapshots' || $key eq 'parent';
+           next if $key eq 'digest' || $key eq 'rootfs' || $key eq 'snapshots' || $key eq 'unprivileged' || $key eq 'parent';
            next if $key =~ /^mp\d+$/; # don't recover mountpoints
            next if $key =~ /^unused\d+$/; # don't recover unused disks
            if ($restricted && $key eq 'lxc') {