]> git.proxmox.com Git - mirror_lxc.git/commit - src/lxc/cgroups/cgfs.c
cgfs: make sure we use valid cgroup mountpoints
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Thu, 25 Feb 2016 19:01:12 +0000 (11:01 -0800)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Thu, 25 Feb 2016 19:18:17 +0000 (11:18 -0800)
commitd3f99e96fb70732bdb11d247f457cb0771665b1b
treea58075c03f647a17b9991a107bfec9181102608e
parentfa79f0a4e3fc3a99cf806f3076baa640709ba06d
cgfs: make sure we use valid cgroup mountpoints

If lxcfs starts before cgroup-lite, then the first cgroup mountpoints in
/proc/self/mountinfo are /run/lxcfs/*.  Unprivileged users cannot access
these.  So privileged containers are ok, and unprivileged containers are ok
since they won't cache those to begin with.  But unprivileged root-owned
containers cache /run/lxcfs/* and then try to use them.

So when doing cgroup automounting check whether the mountpoints we have
stored are accessible, and if not look for a new one to use.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/cgfs.c