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 3/3] migration: require Sys.Modify for incoming privileged containers
Date: Wed, 30 Jul 2025 17:00:12 +0200	[thread overview]
Message-ID: <20250730150013.901666-4-f.gruenbichler@proxmox.com> (raw)
In-Reply-To: <20250730150013.901666-1-f.gruenbichler@proxmox.com>

an incoming remote migration is akin to a container creation, so treat it the same.

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

diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index 951b1c7..2574739 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -3036,6 +3036,7 @@ __PACKAGE__->register_method({
                             unprivileged => $unprivileged,
                             arch => $arch,
                         };
+                        $rpcenv->check($authuser, '/', ['Sys.Modify']) if !$unprivileged;
                         PVE::LXC::check_ct_modify_config_perm(
                             $rpcenv,
                             $authuser,
-- 
2.39.5



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

  parent 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 " Fabian Grünbichler
2025-07-30 15:00 ` [pve-devel] [PATCH container 1/3] api: create: default to unprivileged containers Fabian Grünbichler
2025-07-30 23:59   ` [pve-devel] applied: " 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 ` Fabian Grünbichler [this message]
2025-07-30 23:59   ` [pve-devel] applied: [PATCH container 3/3] migration: require Sys.Modify for incoming " 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-4-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