X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=kernel%2Fcapability.c;h=989f5bfc57dcfde3046b2756ddd2aac59da1ec73;hb=12db5562e0352986a265841638482b84f3a6899b;hp=a5cf13c018ceca356dd02c37bd460abf9d95eddf;hpb=ed4bf4f5e36ccc0d8d9c87bbee04d43c2b2311e8;p=cascardo%2Flinux.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;