audit: use inline function to get audit context
Recognizing that the audit context is an internal audit value, use an access function to retrieve the audit context pointer for the task rather than reaching directly into the task struct to get it. Signed-off-by: Richard Guy Briggs <rgb@redhat.com> [PM: merge fuzz in auditsc.c and selinuxfs.c, checkpatch.pl fixes] Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
parent
f0b752168d
commit
cdfb6b341f
15 changed files with 77 additions and 69 deletions
|
|
@ -326,7 +326,7 @@ void ima_audit_measurement(struct integrity_iint_cache *iint,
|
|||
hex_byte_pack(hash + (i * 2), iint->ima_hash->digest[i]);
|
||||
hash[i * 2] = '\0';
|
||||
|
||||
ab = audit_log_start(current->audit_context, GFP_KERNEL,
|
||||
ab = audit_log_start(audit_context(), GFP_KERNEL,
|
||||
AUDIT_INTEGRITY_RULE);
|
||||
if (!ab)
|
||||
goto out;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ void integrity_audit_msg(int audit_msgno, struct inode *inode,
|
|||
if (!integrity_audit_info && audit_info == 1) /* Skip info messages */
|
||||
return;
|
||||
|
||||
ab = audit_log_start(current->audit_context, GFP_KERNEL, audit_msgno);
|
||||
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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue