]> xenbits.xensource.com Git - libvirt.git/commit
Don't use CLONE_NEWUSER for now
authorSerge E. Hallyn <serge.hallyn@canonical.com>
Wed, 9 Feb 2011 02:58:24 +0000 (20:58 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 9 Feb 2011 15:23:37 +0000 (08:23 -0700)
commit28209ca05e132665f035b14342c6261b7f97e4b8
tree08ed7783466fb5f6c3e06826c72c4f8905173146
parent5ec8fb566206c49d6abe054bc39b72353ec9811d
Don't use CLONE_NEWUSER for now

Until now, user namespaces have not done much, but (for that
reason) have been innocuous to glob in with other CLONE_
flags.  Upcoming userns development, however, will make tasks
cloned with CLONE_NEWUSER far more restricted.  In particular,
for some time they will be unable to access files with anything
other than the world access perms.

This patch assumes that noone really needs the user namespaces
to be enabled.  If that is wrong, then we can try a more
baroque patch where we create a file owned by a test userid with
700 perms and, if we can't access it after setuid'ing to that
userid, then return 0.  Otherwise, assume we are using an
older, 'harmless' user namespace implementation.

Comments appreciated.  Is it ok to do this?

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