public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH container 1/3] api: create: default to unprivileged containers
Date: Wed, 30 Jul 2025 17:00:10 +0200	[thread overview]
Message-ID: <20250730150013.901666-2-f.gruenbichler@proxmox.com> (raw)
In-Reply-To: <20250730150013.901666-1-f.gruenbichler@proxmox.com>

restore keeps what is in the backup config, but allows switching to
unprivileged. switching from unprivileged to privileged requires VM.Allocate at
the moment.

the config schema default cannot easily be changed to unprivileged, as that
would break existing configs.

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

diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index a56c441..a247b80 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -252,6 +252,8 @@ __PACKAGE__->register_method({
 
         if ($restore) {
             # fixme: limit allowed parameters
+        } else {
+            $unprivileged = 1 if !defined($unprivileged);
         }
 
         my $force = extract_param($param, 'force');
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

  reply	other threads:[~2025-07-30 14:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-30 15:00 [pve-devel] [PATCH container/manager 0/4] restrict privileged containers Fabian Grünbichler
2025-07-30 15:00 ` Fabian Grünbichler [this message]
2025-07-30 23:59   ` [pve-devel] applied: [PATCH container 1/3] api: create: default to unprivileged containers Thomas Lamprecht
2025-07-30 15:00 ` [pve-devel] [PATCH container 2/3] create/restore: require Sys.Modify for privileged containers Fabian Grünbichler
2025-07-30 23:59   ` [pve-devel] applied: " Thomas Lamprecht
2025-07-30 15:00 ` [pve-devel] [PATCH container 3/3] migration: require Sys.Modify for incoming " Fabian Grünbichler
2025-07-30 23:59   ` [pve-devel] applied: " Thomas Lamprecht
2025-07-30 15:00 ` [pve-devel] [PATCH manager 1/1] lxc: create: always submit unprivileged field Fabian Grünbichler
2025-07-30 23:21   ` [pve-devel] applied: " Thomas Lamprecht

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=20250730150013.901666-2-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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal