|
@@ -1234,7 +1234,7 @@ static void check_unsafe_exec(struct linux_binprm *bprm)
|
|
* This isn't strictly necessary, but it makes it harder for LSMs to
|
|
* This isn't strictly necessary, but it makes it harder for LSMs to
|
|
* mess up.
|
|
* mess up.
|
|
*/
|
|
*/
|
|
- if (current->no_new_privs)
|
|
|
|
|
|
+ if (task_no_new_privs(current))
|
|
bprm->unsafe |= LSM_UNSAFE_NO_NEW_PRIVS;
|
|
bprm->unsafe |= LSM_UNSAFE_NO_NEW_PRIVS;
|
|
|
|
|
|
t = p;
|
|
t = p;
|
|
@@ -1272,7 +1272,7 @@ int prepare_binprm(struct linux_binprm *bprm)
|
|
bprm->cred->egid = current_egid();
|
|
bprm->cred->egid = current_egid();
|
|
|
|
|
|
if (!(bprm->file->f_path.mnt->mnt_flags & MNT_NOSUID) &&
|
|
if (!(bprm->file->f_path.mnt->mnt_flags & MNT_NOSUID) &&
|
|
- !current->no_new_privs &&
|
|
|
|
|
|
+ !task_no_new_privs(current) &&
|
|
kuid_has_mapping(bprm->cred->user_ns, inode->i_uid) &&
|
|
kuid_has_mapping(bprm->cred->user_ns, inode->i_uid) &&
|
|
kgid_has_mapping(bprm->cred->user_ns, inode->i_gid)) {
|
|
kgid_has_mapping(bprm->cred->user_ns, inode->i_gid)) {
|
|
/* Set-uid? */
|
|
/* Set-uid? */
|