From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 3B5ED1FF13F for ; Thu, 07 May 2026 12:16:46 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id CE19C12B34; Thu, 7 May 2026 12:16:43 +0200 (CEST) Date: Thu, 7 May 2026 12:16:04 +0200 From: Wolfgang Bumiller To: Filip Schauer Subject: partially-applied: [PATCH container/manager v2 0/7] implement per-mountpoint uid/gid mapping Message-ID: References: <20260330141021.151921-1-f.schauer@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260330141021.151921-1-f.schauer@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1778148857090 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.087 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 7MEPLCBPXFNKZ7W7DZYJXFJAVAIZ3FZO X-Message-ID-Hash: 7MEPLCBPXFNKZ7W7DZYJXFJAVAIZ3FZO X-MailFrom: w.bumiller@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: pve-devel@lists.proxmox.com X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: applied the pve-container parts (without the d/control patch as it has become obsolete) On Mon, Mar 30, 2026 at 04:10:11PM +0200, Filip Schauer wrote: > Add support for configuring UID/GID mappings on individual container > mount points without affecting the global container mapping. > > A new "idmap" mount point option accepts semicolon-separated mappings: > ``` > idmap=type:ct:host:len;type:ct:host:len;... > ``` > > type: can be either 'u' or 'g' > ct: ID as seen inside the container > host: corresponding ID on the host > len: number of consecutive IDs to map > > Unmapped ranges inherit the container's ID mapping. > > Example to pass through the host UID & GID 1005: > ``` > mp0: /mnt/data,mp=/data,idmap=u:1005:1005:1;g:1005:1005:1 > ``` > > To identity-map the entire range of ids, "passthrough" can be used: > ``` > idmap=passthrough > ``` > > Mount point idmapping only works for unprivileged containers. Privileged > containers are unaffected. > > Build/Bump order: > * pve-container > * pve-manager > > Changes since v1: > * Include $msg in error message in sync_send/sync_recv > * Switch idmap from space-separated to semicolon-separated > * Improve documentation of idmap option > * Add 'idmap=passthrough' > * Cache user namespace file descriptors in memory at container startup > to avoid overhead of re-creating duplicates > > pve-container: > > Filip Schauer (5): > namespaces: relax prototype of run_in_userns > namespaces: refactor run_in_userns > d/control: update versioned dependency for libpve-common-perl > namespaces: add helper to create user namespace from idmap > implement per-mountpoint uid/gid mapping > > debian/control | 2 +- > src/PVE/LXC.pm | 96 +++++++++++++++++++++++++++++++++++++-- > src/PVE/LXC/Config.pm | 39 ++++++++++++++++ > src/PVE/LXC/Namespaces.pm | 63 ++++++++++++++++++++----- > src/lxc-pve-prestart-hook | 23 ++++++++++ > 5 files changed, 206 insertions(+), 17 deletions(-) > > > pve-manager: > > Filip Schauer (2): > ui: lxc/MPEdit: remove duplicate "mp" assignment > ui: lxc/MPEdit: add "idmap" option > > www/manager6/lxc/MPEdit.js | 213 ++++++++++++++++++++++++++++++++++++- > 1 file changed, 212 insertions(+), 1 deletion(-) > > > Summary over all repositories: > 6 files changed, 418 insertions(+), 18 deletions(-) > > -- > Generated by git-murpp 0.6.0 > > > > --