Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6246ccab authored by Eric Paris's avatar Eric Paris Committed by Al Viro
Browse files

[AUDIT] do not panic on exclude messages in audit_log_pid_context()



If we fail to get an ab in audit_log_pid_context this may be due to an exclude
rule rather than a memory allocation failure.  If it was due to a memory
allocation failue we would have already paniced and no need to do it again.

Signed-off-by: default avatarEric Paris <eparis@redhat.com>
parent c0641f28
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -948,7 +948,7 @@ static int audit_log_pid_context(struct audit_context *context, pid_t pid,


	ab = audit_log_start(context, GFP_KERNEL, AUDIT_OBJ_PID);
	ab = audit_log_start(context, GFP_KERNEL, AUDIT_OBJ_PID);
	if (!ab)
	if (!ab)
		return 1;
		return rc;


	audit_log_format(ab, "opid=%d oauid=%d ouid=%d oses=%d", pid, auid,
	audit_log_format(ab, "opid=%d oauid=%d ouid=%d oses=%d", pid, auid,
			 uid, sessionid);
			 uid, sessionid);