]> git.proxmox.com Git - pve-cluster.git/commitdiff
pmxcfs: do not grant LXC configs o+r permissions anymore
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 7 Oct 2020 07:56:05 +0000 (09:56 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 7 Oct 2020 11:36:14 +0000 (13:36 +0200)
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>
data/src/pmxcfs.c

index 40ee6cd598b84313cedc3e6cb0ba7160fc35ec31..d78a248e760241301c1cb614ee5fedd71bf440c6 100644 (file)
@@ -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
                        }
                }
        }