Bug 19141

Summary: further extended logging information
Product: dbus Reporter: Colin Walters <walters>
Component: coreAssignee: Havoc Pennington <hp>
Status: RESOLVED FIXED QA Contact: John (J5) Palmieri <johnp>
Severity: normal    
Priority: medium CC: walters
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: More syslog information
further patch

Description Colin Walters 2008-12-17 13:06:16 UTC
Created attachment 21250 [details] [review]
More syslog information

This patch adds even more information to the logs; in particular the command is extremely useful for tracking down the origin of denied messages such as method replies that might otherwise have no information other than the connection basenames.

Sample output:

Dec 17 16:00:45 space-ghost dbus: Rejected send message, 1 matched rules; type="method_call", sender=":1.0" (uid=500 pid=24072 comm="/src/jhbuil
d/checkout/dbus/tools/.libs/lt-dbus-sen") interface="org.freedesktop.TestSuite" member="Echo" error name="(unset)" destination="org.freedesktop.
DBus.TestSuiteEchoService" (uid=500 pid=24132 comm="/src/jhbuild/checkout/dbus/test/test-service "))

Please review.
Comment 1 Havoc Pennington 2008-12-17 16:25:32 UTC
Comment on attachment 21250 [details] [review]
More syslog information

There's a _dbus_file_get_contents() you could probably use to read the info out of /proc and save some code.

Patch looks good.
Comment 2 Colin Walters 2008-12-17 16:31:38 UTC
Created attachment 21255 [details] [review]
further patch

This further patch on top of the previous adds some more information, see the commit log.
Comment 3 Colin Walters 2008-12-17 16:33:26 UTC
(In reply to comment #1)
> (From update of attachment 21250 [details] [review])
> There's a _dbus_file_get_contents() you could probably use to read the info out
> of /proc and save some code.

I originally tried using _get_contents and scratched my head as to why it didn't work; the problem turns out to be that it fstats() the file, but all files in /proc report a 0 size to stat, and so it just doesn't read anything.

I considered adding a separate function, but it seems like a special use case anyways.
Comment 4 Colin Walters 2008-12-18 08:48:36 UTC
Pushed to master.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.