mirror of
https://github.com/troglobit/finit.git
synced 2026-11-19 19:40:50 +00:00
libink: a brokerless D-Bus implementation for Finit
Finit had no way to answer the question every service manager gets asked: what is running, and change it. D-Bus is how the rest of userspace asks, but linking libdbus, sd-bus or GIO into PID 1 buys a dependency, an allocator and a main loop we do not control. So libink: the wire format, an object tree, and a bus of Finit's own at /run/finit/bus, gated like INIT_SOCKET. It speaks the standard org.freedesktop.DBus, .Peer, .Introspectable interfaces, and Finit's own Manager1, Service1 and Cond1 on top. Methods that change something are marked privileged and answered only for a caller the kernel vouched for, via SO_PEERCRED. Server and client both, since initctl is the first thing that needs to talk to it, and its Start/Stop/Restart/Reload now go over the bus rather than the legacy socket. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
ae9a24f44f
commit
0a269f3298
39 files changed
+5530
-49
No files matched your search
@@ -12,6 +12,7 @@ AC_CONFIG_FILES([Makefile
|
||||
contrib/debian/Makefile contrib/debian/finit.d/Makefile contrib/debian/finit.d/available/Makefile
|
||||
contrib/void/Makefile contrib/void/finit.d/Makefile contrib/void/finit.d/available/Makefile
|
||||
doc/Makefile doc/config/Makefile
|
||||
libink/Makefile libink/libink.pc
|
||||
libsystemd/Makefile libsystemd/libsystemd.pc
|
||||
man/Makefile
|
||||
plugins/Makefile
|
||||
@@ -94,6 +95,10 @@ AC_ARG_ENABLE(logrotate,
|
||||
AS_HELP_STRING([--disable-logrotate], [Disable built-in rotation of /var/log/wtmp]),,[
|
||||
enable_logrotate=yes])
|
||||
|
||||
AC_ARG_ENABLE(dbus,
|
||||
AS_HELP_STRING([--disable-dbus], [Disable D-Bus support (libink + Finit object tree)]),,[
|
||||
enable_dbus=yes])
|
||||
|
||||
AC_ARG_ENABLE(doc,
|
||||
AS_HELP_STRING([--disable-doc], [Disable build and install of doc/ section]),,[
|
||||
enable_doc=yes])
|
||||
@@ -243,6 +248,10 @@ AS_IF([test "x$enable_rescue" != "xno"], [
|
||||
|
||||
AM_CONDITIONAL(LOGROTATE, [test "x$enable_logrotate" = "xyes"])
|
||||
|
||||
AS_IF([test "x$enable_dbus" = "xyes"], [
|
||||
AC_DEFINE(HAVE_DBUS, 1, [Build D-Bus support via libink])])
|
||||
AM_CONDITIONAL(DBUS, [test "x$enable_dbus" = "xyes"])
|
||||
|
||||
### With features ##############################################################################
|
||||
AS_IF([test "x$bash_dir" = "xyes"], [
|
||||
PKG_CHECK_MODULES([BASH_COMPLETION], [bash-completion >= 2.0],
|
||||
@@ -438,6 +447,7 @@ Optional features:
|
||||
Built-in sulogin......: $with_sulogin $sulogin
|
||||
Built-in watchdogd....: $with_watchdog $watchdog
|
||||
Built-in logrotate....: $enable_logrotate
|
||||
D-Bus support (libink): $enable_dbus
|
||||
Replacement libsystemd: $with_libsystemd
|
||||
Use cgroup v2.........: $enable_cgroup
|
||||
Use libcap............: $enable_libcap
|
||||
|
||||
Reference in new issue
Block a user