From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] applied: [PATCH cluster] pmxcfs: do not grant LXC configs o+r permissions anymore
Date: Wed, 7 Oct 2020 16:06:57 +0200 [thread overview]
Message-ID: <20201007140657.18351-1-t.lamprecht@proxmox.com> (raw)
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 <t.lamprecht@proxmox.com>
---
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
reply other threads:[~2020-10-07 14:07 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=20201007140657.18351-1-t.lamprecht@proxmox.com \
--to=t.lamprecht@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