From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 054236058F for ; Wed, 7 Oct 2020 16:07:34 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id A29FB2F11D for ; Wed, 7 Oct 2020 16:07:03 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 23B1C2F115 for ; Wed, 7 Oct 2020 16:07:03 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id E0DB045C2C for ; Wed, 7 Oct 2020 16:07:02 +0200 (CEST) From: Thomas Lamprecht To: pve-devel@lists.proxmox.com Date: Wed, 7 Oct 2020 16:06:57 +0200 Message-Id: <20201007140657.18351-1-t.lamprecht@proxmox.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.143 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] applied: [PATCH cluster] pmxcfs: do not grant LXC configs o+r permissions anymore X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2020 14:07:34 -0000 This was initially done because of some hook reading the config from an unprivileged namespace when using unprivileged containers. But, we nowadays do not do this anymore, either setup stuff before to or use another source for getting required information (e.g., our autodev hook uses "/var/lib/lxc/$vmid/devices"). Signed-off-by: Thomas Lamprecht --- This cas some potential for fall-out, so we should watch it closely. My CTs, both privileged and unprivileged start just fine. Talked a bit with Dominik and Wolfgang B., plus audited the CT hooks; it really seems not required anymore. If there's a regression, we rather should fix that in another way than makeing CT configs world readable.. data/src/pmxcfs.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/data/src/pmxcfs.c b/data/src/pmxcfs.c index 40ee6cd..d78a248 100644 --- a/data/src/pmxcfs.c +++ b/data/src/pmxcfs.c @@ -142,11 +142,7 @@ static int cfs_fuse_getattr(const char *path, struct stat *stbuf) if (S_ISDIR(stbuf->st_mode) || S_ISLNK(stbuf->st_mode)) { stbuf->st_mode &= 0777755; // access for other users } else { - if (path_is_lxc_conf(path)) { - stbuf->st_mode &= 0777755; // access for other users - } else { - stbuf->st_mode &= 0777750; // no access for other users - } + stbuf->st_mode &= 0777750; // no access for other users } } } -- 2.20.1