On Thu, 11 Apr 2024, Krzysztof Kowalski wrote:> Dear OpenSSH developers, > > I was looking at the fail2ban project and had an idea that instead of parsing > log files it could be possible to notify interested parties (like fail2ban) > via (for instance) D-bus about a failed login attempt. > > Other application could also use this protocol to notify about suspect > behaviors. A central functionality will allow for other (new) projects to > integrate without much effort. > > What do you think?As others have mentioned, we're really not in the mood for more library dependencies right now. However, some people have asked for platform features that would require D-bus support. I don't know much about the D-bus protocol, but if a small D-bus client is just opening a unix domain socket and writing a message to it then we could possibly support it using a standalone implementation, like we just did for systemd. -d
> I don't know much about the > D-bus protocol, but if a small D-bus client is just opening a unix > domain > socket and writing a message to it then we could possibly support it > using a standalone implementation, like we just did for systemd.Afraid not, D-Bus is a stateful protocol with client authentication and so much more, it's not something you really want to reimplement locally, using one of the available libraries is the only reasonable approach. There are de-facto two usable libraries for C projects, the first one is GDBus, provided by the GLib library, and pretty much requires buying into the whole GLib model of main loop and event processing. The second one is sd-bus, which is smaller and can be used in other event/main loops implementation and, I'm sure you'll be delighted to know, it's from libsystemd ;-) https://www.freedesktop.org/wiki/Software/DBusBindings/ -- Kind regards, Luca Boccassi
Possibly Parallel Threads
- [Bug 2641] New: Add systemd notify code to to track running server
- yum / rpm kernel problems - CentOS 7.2
- Re: [PATCH] p2v: Inhibit power saving during the conversion.
- Centos7: start job running for dev/mapper-centos\x2dhome.device
- Problem with Install R on Linux Ubuntu 16.04 Xenial Xerus