summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Efremov <efremov@linux.com>2020-08-24 14:54:35 +0200
committerMimi Zohar <zohar@linux.ibm.com>2020-08-31 23:46:50 +0200
commite44f128768bf28c17a5c0a35b5942bd04a8a64b0 (patch)
treec8c5800bb350adcd8683b183ddb0ea6077f41ac8
parentima: Fail rule parsing when asymmetric key measurement isn't supportable (diff)
downloadlinux-e44f128768bf28c17a5c0a35b5942bd04a8a64b0.tar.xz
linux-e44f128768bf28c17a5c0a35b5942bd04a8a64b0.zip
integrity: Use current_uid() in integrity_audit_message()
Modify integrity_audit_message() to use current_uid(). Signed-off-by: Denis Efremov <efremov@linux.com> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
-rw-r--r--security/integrity/integrity_audit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/integrity/integrity_audit.c b/security/integrity/integrity_audit.c
index f25e7df099c8..29220056207f 100644
--- a/security/integrity/integrity_audit.c
+++ b/security/integrity/integrity_audit.c
@@ -47,7 +47,7 @@ void integrity_audit_message(int audit_msgno, struct inode *inode,
ab = audit_log_start(audit_context(), GFP_KERNEL, audit_msgno);
audit_log_format(ab, "pid=%d uid=%u auid=%u ses=%u",
task_pid_nr(current),
- from_kuid(&init_user_ns, current_cred()->uid),
+ from_kuid(&init_user_ns, current_uid()),
from_kuid(&init_user_ns, audit_get_loginuid(current)),
audit_get_sessionid(current));
audit_log_task_context(ab);