X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=include%2Flinux%2Fuser_namespace.h;h=b5f41d4c2eec71a3d3c786128f0f980f0b41317d;hb=53521d8c90d366191b6c134f88a8ebe83de60614;hp=92a45867ecfb743d47ab962fabe90a4af11b1573;hpb=acce292c82d4d82d35553b928df2b0597c3a9c78;p=safe%2Fjmp%2Flinux-2.6 diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h index 92a4586..b5f41d4 100644 --- a/include/linux/user_namespace.h +++ b/include/linux/user_namespace.h @@ -4,13 +4,14 @@ #include #include #include +#include #define UIDHASH_BITS (CONFIG_BASE_SMALL ? 3 : 8) #define UIDHASH_SZ (1 << UIDHASH_BITS) struct user_namespace { struct kref kref; - struct list_head uidhash_table[UIDHASH_SZ]; + struct hlist_head uidhash_table[UIDHASH_SZ]; struct user_struct *root_user; }; @@ -45,7 +46,10 @@ static inline struct user_namespace *get_user_ns(struct user_namespace *ns) static inline struct user_namespace *copy_user_ns(int flags, struct user_namespace *old_ns) { - return NULL; + if (flags & CLONE_NEWUSER) + return ERR_PTR(-EINVAL); + + return old_ns; } static inline void put_user_ns(struct user_namespace *ns)