mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
userns: Convert the move_pages, and migrate_pages permission checks to use uid_eq
Acked-by: Serge Hallyn <[email protected]> Signed-off-by: Eric W. Biederman <[email protected]>
This commit is contained in:
parent
14a590c3f9
commit
b38a86eb19
3 changed files with 4 additions and 6 deletions
|
|
@ -1371,8 +1371,8 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid, unsigned long, nr_pages,
|
|||
* userid as the target process.
|
||||
*/
|
||||
tcred = __task_cred(task);
|
||||
if (cred->euid != tcred->suid && cred->euid != tcred->uid &&
|
||||
cred->uid != tcred->suid && cred->uid != tcred->uid &&
|
||||
if (!uid_eq(cred->euid, tcred->suid) && !uid_eq(cred->euid, tcred->uid) &&
|
||||
!uid_eq(cred->uid, tcred->suid) && !uid_eq(cred->uid, tcred->uid) &&
|
||||
!capable(CAP_SYS_NICE)) {
|
||||
rcu_read_unlock();
|
||||
err = -EPERM;
|
||||
|
|
|
|||
Loading…
Reference in a new issue