projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6708075
)
userns: Check uid_map's opener's fsuid, not the current fsuid
author
Andy Lutomirski
<luto@amacapital.net>
Sun, 14 Apr 2013 23:28:19 +0000
(16:28 -0700)
committer
Andy Lutomirski
<luto@amacapital.net>
Mon, 15 Apr 2013 01:11:31 +0000
(18:11 -0700)
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
kernel/user_namespace.c
patch
|
blob
|
history
diff --git
a/kernel/user_namespace.c
b/kernel/user_namespace.c
index e2d4ace4481bb0a277d45d1789082b28b74c3bae..5c16f3aa757a0353f8d7621b6b9d16cd586b347e 100644
(file)
--- a/
kernel/user_namespace.c
+++ b/
kernel/user_namespace.c
@@
-797,12
+797,12
@@
static bool new_idmap_permitted(const struct file *file,
u32 id = new_map->extent[0].lower_first;
if (cap_setid == CAP_SETUID) {
kuid_t uid = make_kuid(ns->parent, id);
- if (uid_eq(uid,
current_fsuid()
))
+ if (uid_eq(uid,
file->f_cred->fsuid
))
return true;
}
else if (cap_setid == CAP_SETGID) {
kgid_t gid = make_kgid(ns->parent, id);
- if (gid_eq(gid,
current_fsgid()
))
+ if (gid_eq(gid,
file->f_cred->fsgid
))
return true;
}
}