diff options
| author | Jiri Kosina <jkosina@suse.cz> | 2017-11-15 11:04:13 +0100 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2017-11-15 11:04:13 +0100 |
| commit | 5cc619db5c34146ee821acd08382b9d78579b52e (patch) | |
| tree | ee28e3cefdb35d56e33887f05db0a50589aa5883 /kernel/sys.c | |
| parent | 83fd5ddc19931d5a5b884c43ee3c9d69c673bc96 (diff) | |
| parent | 287b8e11972f934052f4ed0751df465a5e84b69c (diff) | |
| download | cachepc-linux-5cc619db5c34146ee821acd08382b9d78579b52e.tar.gz cachepc-linux-5cc619db5c34146ee821acd08382b9d78579b52e.zip | |
Merge branch 'for-4.15/alps' into for-linus
- New ALPS touchpad (T4, found currently on HP EliteBook 1000, Zbook Stduio
and HP Elite book x360) support from Masaki Ota
Diffstat (limited to 'kernel/sys.c')
| -rw-r--r-- | kernel/sys.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index 2855ee73acd0..9aebc2935013 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -1896,15 +1896,11 @@ static int validate_prctl_map(struct prctl_mm_map *prctl_map) /* * Finally, make sure the caller has the rights to - * change /proc/pid/exe link: only local root should + * change /proc/pid/exe link: only local sys admin should * be allowed to. */ if (prctl_map->exe_fd != (u32)-1) { - struct user_namespace *ns = current_user_ns(); - const struct cred *cred = current_cred(); - - if (!uid_eq(cred->uid, make_kuid(ns, 0)) || - !gid_eq(cred->gid, make_kgid(ns, 0))) + if (!ns_capable(current_user_ns(), CAP_SYS_ADMIN)) goto out; } |
