X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=kernel%2Fcapability.c;h=989f5bfc57dcfde3046b2756ddd2aac59da1ec73;hb=99eef8e9369abe009006b4fa7f6ca5086c09cf46;hp=a5cf13c018ceca356dd02c37bd460abf9d95eddf;hpb=571366284b50c93ba4ba5f13fad3f2430024c613;p=firefly-linux-kernel-4.4.55.git diff --git a/kernel/capability.c b/kernel/capability.c index a5cf13c018ce..989f5bfc57dc 100644 --- a/kernel/capability.c +++ b/kernel/capability.c @@ -258,6 +258,10 @@ SYSCALL_DEFINE2(capset, cap_user_header_t, header, const cap_user_data_t, data) i++; } + effective.cap[CAP_LAST_U32] &= CAP_LAST_U32_VALID_MASK; + permitted.cap[CAP_LAST_U32] &= CAP_LAST_U32_VALID_MASK; + inheritable.cap[CAP_LAST_U32] &= CAP_LAST_U32_VALID_MASK; + new = prepare_creds(); if (!new) return -ENOMEM;