]> Pileus Git - ~andy/linux/blobdiff - kernel/user.c
SELinux: open perm for sock files
[~andy/linux] / kernel / user.c
index 6608a3d8ca616712726911da18d35f6347e5ba45..d8b332c3ae3a15ba68a2ada320254d414810ec84 100644 (file)
@@ -20,7 +20,7 @@
 
 struct user_namespace init_user_ns = {
        .kref = {
-               .refcount       = ATOMIC_INIT(1),
+               .refcount       = ATOMIC_INIT(2),
        },
        .creator = &root_user,
 };
@@ -104,6 +104,8 @@ static int sched_create_user(struct user_struct *up)
        if (IS_ERR(up->tg))
                rc = -ENOMEM;
 
+       set_tg_uid(up);
+
        return rc;
 }