summaryrefslogtreecommitdiffstats
path: root/include/linux/uidgid.h
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-05-25 18:37:55 -0600
committerEric W. Biederman <ebiederm@xmission.com>2013-11-26 20:55:33 -0800
commit261000a56b6382f597bcb12000f55c9ff26a1efb (patch)
tree5280a6706c24fea298faf82526166c28f86dc1de /include/linux/uidgid.h
parent41301ae78a99ead04ea42672a1ab72c6f44cc81d (diff)
downloadlinux-261000a56b6382f597bcb12000f55c9ff26a1efb.tar.gz
linux-261000a56b6382f597bcb12000f55c9ff26a1efb.tar.bz2
linux-261000a56b6382f597bcb12000f55c9ff26a1efb.zip
userns: userns: Remove UIDGID_STRICT_TYPE_CHECKS
Removing UIDGID_STRICT_TYPE_CHECKS simplifies the code and always generates a compile error if the uids and kuids or gids and kgids are mixed by accident. Now that the appropriate conversions have been placed throughout the kernel there is no longer a need for a mode where we don't detect them as compile errors. Acked-by: Serge Hallyn <serge.hallyn@canonical.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'include/linux/uidgid.h')
-rw-r--r--include/linux/uidgid.h22
1 files changed, 0 insertions, 22 deletions
diff --git a/include/linux/uidgid.h b/include/linux/uidgid.h
index 8e522cbcef29..2d1f9b627f91 100644
--- a/include/linux/uidgid.h
+++ b/include/linux/uidgid.h
@@ -17,8 +17,6 @@
struct user_namespace;
extern struct user_namespace init_user_ns;
-#ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
-
typedef struct {
uid_t val;
} kuid_t;
@@ -41,26 +39,6 @@ static inline gid_t __kgid_val(kgid_t gid)
return gid.val;
}
-#else
-
-typedef uid_t kuid_t;
-typedef gid_t kgid_t;
-
-static inline uid_t __kuid_val(kuid_t uid)
-{
- return uid;
-}
-
-static inline gid_t __kgid_val(kgid_t gid)
-{
- return gid;
-}
-
-#define KUIDT_INIT(value) ((kuid_t) value )
-#define KGIDT_INIT(value) ((kgid_t) value )
-
-#endif
-
#define GLOBAL_ROOT_UID KUIDT_INIT(0)
#define GLOBAL_ROOT_GID KGIDT_INIT(0)