Commit cd77b821 authored by David Woodhouse's avatar David Woodhouse

Restore logging of pid= and comm= in AVC audit messages

We turned this all off because the 'exe=' was causing deadlocks on
dcache_lock. There's no need to leave the pid and comm out though. 
They'll all be logged correctly if full auditing is enabled, but we
should still print them in case auditing _isn't_ enabled.
Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent b7d11258
...@@ -532,6 +532,7 @@ void avc_audit(u32 ssid, u32 tsid, ...@@ -532,6 +532,7 @@ void avc_audit(u32 ssid, u32 tsid,
u16 tclass, u32 requested, u16 tclass, u32 requested,
struct av_decision *avd, int result, struct avc_audit_data *a) struct av_decision *avd, int result, struct avc_audit_data *a)
{ {
struct task_struct *tsk = current;
struct inode *inode = NULL; struct inode *inode = NULL;
u32 denied, audited; u32 denied, audited;
struct audit_buffer *ab; struct audit_buffer *ab;
...@@ -555,6 +556,12 @@ void avc_audit(u32 ssid, u32 tsid, ...@@ -555,6 +556,12 @@ void avc_audit(u32 ssid, u32 tsid,
audit_log_format(ab, "avc: %s ", denied ? "denied" : "granted"); audit_log_format(ab, "avc: %s ", denied ? "denied" : "granted");
avc_dump_av(ab, tclass,audited); avc_dump_av(ab, tclass,audited);
audit_log_format(ab, " for "); audit_log_format(ab, " for ");
if (a && a->tsk)
tsk = a->tsk;
if (a->tsk && a->tsk->pid) {
audit_log_format(ab, " pid=%d comm=", tsk->pid);
audit_log_untrustedstring(ab, tsk->comm);
}
if (a) { if (a) {
switch (a->type) { switch (a->type) {
case AVC_AUDIT_DATA_IPC: case AVC_AUDIT_DATA_IPC:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment