From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH container] api: mtunnel: fix handling of privileged containers
Date: Tue, 8 Sep 2026 13:59:29 +0200 [thread overview]
Message-ID: <20260908120035.416049-1-f.gruenbichler@proxmox.com> (raw)
the unprivileged flag is only set in the config for unprivileged containers,
privileged containers normally simply do not have a value set.
passing an undef value is persisted in the config as
unprivileged:
which triggers a warning when parsing the config later on.
by only setting the config key in the unprivileged case, the behaviour is
identical to container creation.
Reported in the community forum:
https://forum.proxmox.com/threads/186251/
Signed-off-by: Fabian Grünbichler <f.gruenbichler@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 42d51a0..5f94d5a 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -3269,10 +3269,13 @@ __PACKAGE__->register_method({
eval {
my $conf = {
- unprivileged => $unprivileged,
arch => $arch,
};
- $rpcenv->check($authuser, '/', ['Sys.Modify']) if !$unprivileged;
+ if ($unprivileged) {
+ $conf->{unprivileged} = 1;
+ } else {
+ $rpcenv->check($authuser, '/', ['Sys.Modify']);
+ }
PVE::LXC::check_ct_modify_config_perm(
$rpcenv,
$authuser,
--
2.47.3
reply other threads:[~2026-09-08 12:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260908120035.416049-1-f.gruenbichler@proxmox.com \
--to=f.gruenbichler@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox