- Always report the current process as capset now always only works on the current process. This prevents reporting 0 or a random pid in a random pid namespace. - Don't bother to pass the pid as is available. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> (cherry picked from commit bcc85f0af31af123e32858069eb2ad8f39f90e67) (cherry picked from commit f911cac4556a7a23e0b3ea850233d13b32328692)
Showing the changes to kernel/capability.c (1 of 3 files). Show all
Unified · Split
| @@ -277,7 +277,7 @@ SYSCALL_DEFINE2(capset, cap_user_header_t, header, const cap_user_data_t, data) · 276 unmodified lines | ||
| 277 | 277 | if (ret < 0) |
| 278 | 278 | goto error; |
| 279 | 279 | |
| 280 | − audit_log_capset(pid, new, current_cred()); | |
| 280 | + audit_log_capset(new, current_cred()); | |
| 281 | 281 | |
| 282 | 282 | return commit_creds(new); |
| 283 | 283 | |