]> git.proxmox.com Git - mirror_lxcfs.git/commit - lxcfs.c
mkdir: don't do it as setresid
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Wed, 11 Nov 2015 00:42:34 +0000 (18:42 -0600)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Wed, 11 Nov 2015 00:42:34 +0000 (18:42 -0600)
commit1f69d62e45260348ff18375dae2d787ff804001a
tree4cffc1d94ff1c09e536d53d5c528697d9e125194
parent4622ad783bb1252215666d9cf8b5149d7db3190b
mkdir: don't do it as setresid

First of all the code was wrong anyway.

Secondly, doing mkdir under setres{ug}id won't work because that
won't respect privilege that callers in user namespaces may have.

We check the permissions meticulously anyway, so do the mkdir as
root and then chown the new cgroup.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
cgfs.c
cgfs.h
lxcfs.c