mirror of
https://github.com/troglobit/finit.git
synced 2026-11-15 19:13:11 +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
@@ -160,6 +160,11 @@ struct link_connection {
|
||||
struct link_server *server; /* back-pointer for dispatch */
|
||||
};
|
||||
|
||||
/* log.c — tracing, no-op unless the embedder installed a callback. */
|
||||
void __log(const char *func, const char *fmt, ...)
|
||||
__attribute__((format(printf, 2, 3)));
|
||||
#define __dbg(fmt, ...) __log(__func__, fmt, ##__VA_ARGS__)
|
||||
|
||||
/* io.c — shared EINTR-resilient I/O loops. */
|
||||
int __io_write_all(int fd, const void *buf, size_t len);
|
||||
int __io_read_full(int fd, void *buf, size_t len);
|
||||
|
||||
Reference in new issue
Block a user