|
@@ -17,9 +17,13 @@
|
|
#include <linux/module.h>
|
|
#include <linux/module.h>
|
|
#include <linux/user_namespace.h>
|
|
#include <linux/user_namespace.h>
|
|
|
|
|
|
|
|
+/*
|
|
|
|
+ * userns count is 1 for root user, 1 for init_uts_ns,
|
|
|
|
+ * and 1 for... ?
|
|
|
|
+ */
|
|
struct user_namespace init_user_ns = {
|
|
struct user_namespace init_user_ns = {
|
|
.kref = {
|
|
.kref = {
|
|
- .refcount = ATOMIC_INIT(2),
|
|
|
|
|
|
+ .refcount = ATOMIC_INIT(3),
|
|
},
|
|
},
|
|
.creator = &root_user,
|
|
.creator = &root_user,
|
|
};
|
|
};
|
|
@@ -47,7 +51,7 @@ static struct kmem_cache *uid_cachep;
|
|
*/
|
|
*/
|
|
static DEFINE_SPINLOCK(uidhash_lock);
|
|
static DEFINE_SPINLOCK(uidhash_lock);
|
|
|
|
|
|
-/* root_user.__count is 2, 1 for init task cred, 1 for init_user_ns->creator */
|
|
|
|
|
|
+/* root_user.__count is 2, 1 for init task cred, 1 for init_user_ns->user_ns */
|
|
struct user_struct root_user = {
|
|
struct user_struct root_user = {
|
|
.__count = ATOMIC_INIT(2),
|
|
.__count = ATOMIC_INIT(2),
|
|
.processes = ATOMIC_INIT(1),
|
|
.processes = ATOMIC_INIT(1),
|