From 68a333b9edfe4f3717d2be95261ca3be3c3deb8a Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 18 Feb 2015 17:19:14 +0000 Subject: [PATCH 11/15] fix: when AA denies sending, label requested_reply as such, not as "matched rules" This appears to be copypasta from complain_about_message(), which is sometimes complaining about things rejected by dbus-daemon's own security policy language (hence "n matched rules"). The types coincidentally worked. --- bus/apparmor.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bus/apparmor.c b/bus/apparmor.c index 0b371e6..615a525 100644 --- a/bus/apparmor.c +++ b/bus/apparmor.c @@ -386,16 +386,17 @@ set_error_from_denied_message (DBusError *error, dbus_set_error (error, DBUS_ERROR_ACCESS_DENIED, "An AppArmor policy prevents this sender from sending this " - "message to this recipient, %d matched rules; type=\"%s\", " + "message to this recipient; type=\"%s\", " "sender=\"%s\" (%s) interface=\"%s\" member=\"%s\" " - "error name=\"%s\" destination=\"%s\" (%s)", - requested_reply, + "error name=\"%s\" requested_reply=\"%d\" " + "destination=\"%s\" (%s)", msgtype, bus_connection_get_name (sender), bus_connection_get_loginfo (sender), interface ? interface : unset, member ? member : unset, error_name ? error_name : unset, + requested_reply, destination, proposed_recipient_loginfo); } -- 2.1.4