diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/audit.c | 2 | ||||
| -rw-r--r-- | kernel/capability.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/kernel/audit.c b/kernel/audit.c index 3ef2e0e797e8..ba2ff5a5c600 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
| @@ -1677,7 +1677,7 @@ void audit_log_cap(struct audit_buffer *ab, char *prefix, kernel_cap_t *cap) | |||
| 1677 | audit_log_format(ab, " %s=", prefix); | 1677 | audit_log_format(ab, " %s=", prefix); |
| 1678 | CAP_FOR_EACH_U32(i) { | 1678 | CAP_FOR_EACH_U32(i) { |
| 1679 | audit_log_format(ab, "%08x", | 1679 | audit_log_format(ab, "%08x", |
| 1680 | cap->cap[(_KERNEL_CAPABILITY_U32S-1) - i]); | 1680 | cap->cap[CAP_LAST_U32 - i]); |
| 1681 | } | 1681 | } |
| 1682 | } | 1682 | } |
| 1683 | 1683 | ||
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) | |||
| 258 | i++; | 258 | i++; |
| 259 | } | 259 | } |
| 260 | 260 | ||
| 261 | effective.cap[CAP_LAST_U32] &= CAP_LAST_U32_VALID_MASK; | ||
| 262 | permitted.cap[CAP_LAST_U32] &= CAP_LAST_U32_VALID_MASK; | ||
| 263 | inheritable.cap[CAP_LAST_U32] &= CAP_LAST_U32_VALID_MASK; | ||
| 264 | |||
| 261 | new = prepare_creds(); | 265 | new = prepare_creds(); |
| 262 | if (!new) | 266 | if (!new) |
| 263 | return -ENOMEM; | 267 | return -ENOMEM; |
