]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/exec.c
Merge tag 'nfsd-4.11' of git://linux-nfs.org/~bfields/linux
[mirror_ubuntu-artful-kernel.git] / fs / exec.c
index e579466107335bf4b704863469a4162c8c335adb..698a86094f7672550340c2e4ca20cdf97e8ee0e2 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1426,12 +1426,8 @@ static void check_unsafe_exec(struct linux_binprm *bprm)
        struct task_struct *p = current, *t;
        unsigned n_fs;
 
-       if (p->ptrace) {
-               if (ptracer_capable(p, current_user_ns()))
-                       bprm->unsafe |= LSM_UNSAFE_PTRACE_CAP;
-               else
-                       bprm->unsafe |= LSM_UNSAFE_PTRACE;
-       }
+       if (p->ptrace)
+               bprm->unsafe |= LSM_UNSAFE_PTRACE;
 
        /*
         * This isn't strictly necessary, but it makes it harder for LSMs to
@@ -1479,7 +1475,7 @@ static void bprm_fill_uid(struct linux_binprm *bprm)
        if (task_no_new_privs(current))
                return;
 
-       inode = file_inode(bprm->file);
+       inode = bprm->file->f_path.dentry->d_inode;
        mode = READ_ONCE(inode->i_mode);
        if (!(mode & (S_ISUID|S_ISGID)))
                return;