[pve-devel] applied: [RFC container] fix #2028: keep custom uid mapping during restore

Wolfgang Bumiller w.bumiller at proxmox.com
Thu Dec 27 14:22:18 CET 2018


applied with a fixup

On Thu, Dec 27, 2018 at 12:52:25PM +0100, Oguz Bektas wrote:
> Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
> ---
>  src/PVE/API2/LXC.pm | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
> index 6b3395b..99bfd15 100644
> --- a/src/PVE/API2/LXC.pm
> +++ b/src/PVE/API2/LXC.pm
> @@ -357,11 +357,14 @@ __PACKAGE__->register_method({
>  
>  	    PVE::Cluster::check_cfs_quorum();
>  	    my $vollist = [];
> -
>  	    eval {
> +		my ($orig_conf, $orig_mp_param) = PVE::LXC::Create::recover_config($archive);
> +		if ($authuser eq 'root at pam') {
> +		    @{$conf->{lxc}} = [grep { $_->[0] eq 'lxc.idmap' } @{$orig_conf->{lxc}}]; # do not remove lxc.idmap entries

Removed the @{} in a fixup commit otherwise we end up with an extra
array nesting level.




More information about the pve-devel mailing list