diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2017-01-23 17:26:31 +1300 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2017-01-24 12:03:08 +1300 |
commit | 9227dd2a84a765fcfef1677ff17de0958b192eda (patch) | |
tree | 8dc953fa3145922b6db30c8ebf9f34ff018bde5b /fs | |
parent | 20523132ec5d1b481e1d66557292ed3a3021e817 (diff) | |
download | linux-stable-9227dd2a84a765fcfef1677ff17de0958b192eda.tar.gz linux-stable-9227dd2a84a765fcfef1677ff17de0958b192eda.tar.bz2 linux-stable-9227dd2a84a765fcfef1677ff17de0958b192eda.zip |
exec: Remove LSM_UNSAFE_PTRACE_CAP
With previous changes every location that tests for
LSM_UNSAFE_PTRACE_CAP also tests for LSM_UNSAFE_PTRACE making the
LSM_UNSAFE_PTRACE_CAP redundant, so remove it.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/exec.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/exec.c b/fs/exec.c index e57946610733..c195ebb8e2aa 100644 --- 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 |