aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mips/include/asm/vpe.h2
-rw-r--r--arch/mips/kernel/vpe.c28
-rw-r--r--include/linux/posix_acl.h3
-rw-r--r--include/linux/projid.h15
-rw-r--r--include/linux/uidgid.h22
-rw-r--r--init/Kconfig11
6 files changed, 0 insertions, 81 deletions
diff --git a/arch/mips/include/asm/vpe.h b/arch/mips/include/asm/vpe.h
index c6e1b961537d..0880fe8809b1 100644
--- a/arch/mips/include/asm/vpe.h
+++ b/arch/mips/include/asm/vpe.h
@@ -30,8 +30,6 @@ struct vpe_notifications {
30extern int vpe_notify(int index, struct vpe_notifications *notify); 30extern int vpe_notify(int index, struct vpe_notifications *notify);
31 31
32extern void *vpe_get_shared(int index); 32extern void *vpe_get_shared(int index);
33extern int vpe_getuid(int index);
34extern int vpe_getgid(int index);
35extern char *vpe_getcwd(int index); 33extern char *vpe_getcwd(int index);
36 34
37#endif /* _ASM_VPE_H */ 35#endif /* _ASM_VPE_H */
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c
index 59b2b3cd7885..2d5c142bad67 100644
--- a/arch/mips/kernel/vpe.c
+++ b/arch/mips/kernel/vpe.c
@@ -105,7 +105,6 @@ struct vpe {
105 unsigned long len; 105 unsigned long len;
106 char *pbuffer; 106 char *pbuffer;
107 unsigned long plen; 107 unsigned long plen;
108 unsigned int uid, gid;
109 char cwd[VPE_PATH_MAX]; 108 char cwd[VPE_PATH_MAX];
110 109
111 unsigned long __start; 110 unsigned long __start;
@@ -1083,9 +1082,6 @@ static int vpe_open(struct inode *inode, struct file *filp)
1083 v->load_addr = NULL; 1082 v->load_addr = NULL;
1084 v->len = 0; 1083 v->len = 0;
1085 1084
1086 v->uid = filp->f_cred->fsuid;
1087 v->gid = filp->f_cred->fsgid;
1088
1089 v->cwd[0] = 0; 1085 v->cwd[0] = 0;
1090 ret = getcwd(v->cwd, VPE_PATH_MAX); 1086 ret = getcwd(v->cwd, VPE_PATH_MAX);
1091 if (ret < 0) 1087 if (ret < 0)
@@ -1269,30 +1265,6 @@ void *vpe_get_shared(int index)
1269 1265
1270EXPORT_SYMBOL(vpe_get_shared); 1266EXPORT_SYMBOL(vpe_get_shared);
1271 1267
1272int vpe_getuid(int index)
1273{
1274 struct vpe *v;
1275
1276 if ((v = get_vpe(index)) == NULL)
1277 return -1;
1278
1279 return v->uid;
1280}
1281
1282EXPORT_SYMBOL(vpe_getuid);
1283
1284int vpe_getgid(int index)
1285{
1286 struct vpe *v;
1287
1288 if ((v = get_vpe(index)) == NULL)
1289 return -1;
1290
1291 return v->gid;
1292}
1293
1294EXPORT_SYMBOL(vpe_getgid);
1295
1296int vpe_notify(int index, struct vpe_notifications *notify) 1268int vpe_notify(int index, struct vpe_notifications *notify)
1297{ 1269{
1298 struct vpe *v; 1270 struct vpe *v;
diff --git a/include/linux/posix_acl.h b/include/linux/posix_acl.h
index fb616942e4c7..833099bf8090 100644
--- a/include/linux/posix_acl.h
+++ b/include/linux/posix_acl.h
@@ -39,9 +39,6 @@ struct posix_acl_entry {
39 union { 39 union {
40 kuid_t e_uid; 40 kuid_t e_uid;
41 kgid_t e_gid; 41 kgid_t e_gid;
42#ifndef CONFIG_UIDGID_STRICT_TYPE_CHECKS
43 unsigned int e_id;
44#endif
45 }; 42 };
46}; 43};
47 44
diff --git a/include/linux/projid.h b/include/linux/projid.h
index 36517b95be5c..8c1f2c55226d 100644
--- a/include/linux/projid.h
+++ b/include/linux/projid.h
@@ -18,8 +18,6 @@ extern struct user_namespace init_user_ns;
18 18
19typedef __kernel_uid32_t projid_t; 19typedef __kernel_uid32_t projid_t;
20 20
21#ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
22
23typedef struct { 21typedef struct {
24 projid_t val; 22 projid_t val;
25} kprojid_t; 23} kprojid_t;
@@ -31,19 +29,6 @@ static inline projid_t __kprojid_val(kprojid_t projid)
31 29
32#define KPROJIDT_INIT(value) (kprojid_t){ value } 30#define KPROJIDT_INIT(value) (kprojid_t){ value }
33 31
34#else
35
36typedef projid_t kprojid_t;
37
38static inline projid_t __kprojid_val(kprojid_t projid)
39{
40 return projid;
41}
42
43#define KPROJIDT_INIT(value) ((kprojid_t) value )
44
45#endif
46
47#define INVALID_PROJID KPROJIDT_INIT(-1) 32#define INVALID_PROJID KPROJIDT_INIT(-1)
48#define OVERFLOW_PROJID 65534 33#define OVERFLOW_PROJID 65534
49 34
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 @@
17struct user_namespace; 17struct user_namespace;
18extern struct user_namespace init_user_ns; 18extern struct user_namespace init_user_ns;
19 19
20#ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
21
22typedef struct { 20typedef struct {
23 uid_t val; 21 uid_t val;
24} kuid_t; 22} kuid_t;
@@ -41,26 +39,6 @@ static inline gid_t __kgid_val(kgid_t gid)
41 return gid.val; 39 return gid.val;
42} 40}
43 41
44#else
45
46typedef uid_t kuid_t;
47typedef gid_t kgid_t;
48
49static inline uid_t __kuid_val(kuid_t uid)
50{
51 return uid;
52}
53
54static inline gid_t __kgid_val(kgid_t gid)
55{
56 return gid;
57}
58
59#define KUIDT_INIT(value) ((kuid_t) value )
60#define KGIDT_INIT(value) ((kgid_t) value )
61
62#endif
63
64#define GLOBAL_ROOT_UID KUIDT_INIT(0) 42#define GLOBAL_ROOT_UID KUIDT_INIT(0)
65#define GLOBAL_ROOT_GID KGIDT_INIT(0) 43#define GLOBAL_ROOT_GID KGIDT_INIT(0)
66 44
diff --git a/init/Kconfig b/init/Kconfig
index 8d402e33b7fc..34a0a3bf2390 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1116,8 +1116,6 @@ config IPC_NS
1116 1116
1117config USER_NS 1117config USER_NS
1118 bool "User namespace" 1118 bool "User namespace"
1119 select UIDGID_STRICT_TYPE_CHECKS
1120
1121 default n 1119 default n
1122 help 1120 help
1123 This allows containers, i.e. vservers, to use user namespaces 1121 This allows containers, i.e. vservers, to use user namespaces
@@ -1149,15 +1147,6 @@ config NET_NS
1149 1147
1150endif # NAMESPACES 1148endif # NAMESPACES
1151 1149
1152config UIDGID_STRICT_TYPE_CHECKS
1153 bool "Require conversions between uid/gids and their internal representation"
1154 default n
1155 help
1156 While the nececessary conversions are being added to all subsystems this option allows
1157 the code to continue to build for unconverted subsystems.
1158
1159 Say Y here if you want the strict type checking enabled
1160
1161config SCHED_AUTOGROUP 1150config SCHED_AUTOGROUP
1162 bool "Automatic process group scheduling" 1151 bool "Automatic process group scheduling"
1163 select CGROUPS 1152 select CGROUPS