]> git.proxmox.com Git - pve-container.git/commit
fix #3313: restore: keep unprivileged status from archive config
authorOguz Bektas <o.bektas@proxmox.com>
Thu, 25 Feb 2021 14:11:16 +0000 (15:11 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 25 Feb 2021 14:24:06 +0000 (15:24 +0100)
commit8ffdc11670931ad52df9627968b360e81701383f
treef80c590a345d222d1f00f3fe02f636259078ac95
parent32e56bed0c604c6ea1f154b2405664d6972760e2
fix #3313: restore: keep unprivileged status from archive config

Since pct defaults to privileged containers, it restores the
container as privileged when `--unprivileged 1` is not passed.
Instead we should check the old configuration and retrieve it from
there.

This way, when one creates an unprivileged container, it will be
still be unprivileged after restore, if not overwritten by API
arguments.

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/API2/LXC.pm