|
@@ -548,7 +548,7 @@ skip:
|
|
|
|
|
|
if ((is_setid ||
|
|
if ((is_setid ||
|
|
!cap_issubset(new->cap_permitted, old->cap_permitted)) &&
|
|
!cap_issubset(new->cap_permitted, old->cap_permitted)) &&
|
|
- ((bprm->unsafe & ~(LSM_UNSAFE_PTRACE | LSM_UNSAFE_PTRACE_CAP)) ||
|
|
|
|
|
|
+ ((bprm->unsafe & ~LSM_UNSAFE_PTRACE) ||
|
|
!ptracer_capable(current, new->user_ns))) {
|
|
!ptracer_capable(current, new->user_ns))) {
|
|
/* downgrade; they get no more than they had, and maybe less */
|
|
/* downgrade; they get no more than they had, and maybe less */
|
|
if (!ns_capable(new->user_ns, CAP_SETUID) ||
|
|
if (!ns_capable(new->user_ns, CAP_SETUID) ||
|