]> git.baikalelectronics.ru Git - kernel.git/commit
user namespaces: let user_ns be cloned with fairsched
authorSerge E. Hallyn <serue@us.ibm.com>
Wed, 3 Dec 2008 19:17:06 +0000 (13:17 -0600)
committerJames Morris <jmorris@namei.org>
Sun, 7 Dec 2008 22:16:22 +0000 (09:16 +1100)
commite692e2ecdc15c2d061617e9f7b224f7985af179a
tree41b53e385d947c568b237f5eb3690098d2efd8f6
parent97794dbab81aba69174a779d41dd2f7493e1e41e
user namespaces: let user_ns be cloned with fairsched

(These two patches are in the next-unacked branch of
git://git.kernel.org/pub/scm/linux/kernel/git/sergeh/userns-2.6.
If they get some ACKs, then I hope to feed this into security-next.
After these two, I think we're ready to tackle userns+capabilities)

Fairsched creates a per-uid directory under /sys/kernel/uids/.
So when you clone(CLONE_NEWUSER), it tries to create
/sys/kernel/uids/0, which already exists, and you get back
-ENOMEM.

This was supposed to be fixed by sysfs tagging, but that
was postponed (ok, rejected until sysfs locking is fixed).
So, just as with network namespaces, we just don't create
those directories for user namespaces other than the init.

Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
kernel/user.c