mirror of
https://github.com/troglobit/finit.git
synced 2026-11-10 16:31:21 +00:00
libink: trace connections, calls, and authorization decisions
The legacy socket logs a line per command under initctl debug; the bus logged nothing, so the transport that now carries most of initctl was the one you could not watch. libink gets a logger hook rather than a dependency on Finit's: it passes the emitting function and a formatted message, and dbus.c hands both to logit() so the two sources read alike. Trace points cover the connection lifecycle, every inbound call, and why a call was refused. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
63aabaa6df
commit
1e508f9168
9 files changed
+94
-1
No files matched your search
@@ -77,6 +77,8 @@ int link_connection_call(link_connection_t *conn, const char *destination,
|
||||
if (blen > 0 && __io_write_all(conn->fd, body, (size_t)blen) < 0)
|
||||
return -1;
|
||||
|
||||
__dbg("calling %s.%s on %s, serial %u", interface ? interface : "-",
|
||||
member, destination ? destination : "peer", serial);
|
||||
|
||||
conn->pending[i].used = 1;
|
||||
conn->pending[i].serial = serial;
|
||||
@@ -93,6 +95,7 @@ void link_connection_close(link_connection_t *conn)
|
||||
if (!conn)
|
||||
return;
|
||||
|
||||
__dbg("closing peer on fd %d", conn->fd);
|
||||
|
||||
/* Anything waiting on this connection has to be told, or a parked
|
||||
* call sits forever and its caller never hears back. */
|
||||
|
||||
Reference in new issue
Block a user