mirror of
https://github.com/systemd/systemd.git
synced 2026-11-06 05:17:24 +00:00
Add systemd-varlink-monitord, a daemon that uses BPF LSM and fentry hooks to capture varlink protocol traffic on AF_UNIX sockets. Sockets are classified as varlink by reading the user.varlink xattr. The daemon exposes a varlink API with Setup/Start/Stop methods and passes a ring buffer fd to the client for zero-copy packet delivery. Unprivileged callers can only see their own traffic; polkit authorization grants full access.
39 lines
1.0 KiB
Plaintext
39 lines
1.0 KiB
Plaintext
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
#
|
|
# This file is part of systemd.
|
|
#
|
|
# systemd is free software; you can redistribute it and/or modify it
|
|
# under the terms of the GNU Lesser General Public License as published by
|
|
# the Free Software Foundation; either version 2.1 of the License, or
|
|
# (at your option) any later version.
|
|
|
|
[Unit]
|
|
Description=Varlink Monitor
|
|
Documentation=man:systemd-varlink-monitord.service(8)
|
|
|
|
[Service]
|
|
DynamicUser=yes
|
|
AmbientCapabilities=CAP_BPF CAP_PERFMON
|
|
CapabilityBoundingSet=CAP_BPF CAP_PERFMON
|
|
ExecStart={{LIBEXECDIR}}/systemd-varlink-monitord
|
|
IPAddressDeny=any
|
|
LockPersonality=yes
|
|
MemoryDenyWriteExecute=yes
|
|
NoNewPrivileges=yes
|
|
PrivateDevices=yes
|
|
PrivateTmp=disconnected
|
|
ProtectClock=yes
|
|
ProtectHome=yes
|
|
ProtectHostname=yes
|
|
ProtectKernelLogs=yes
|
|
ProtectKernelModules=yes
|
|
ProtectKernelTunables=yes
|
|
ProtectSystem=strict
|
|
RestrictAddressFamilies=AF_UNIX
|
|
RestrictNamespaces=yes
|
|
RestrictRealtime=yes
|
|
RestrictSUIDSGID=yes
|
|
SystemCallArchitectures=native
|
|
SystemCallErrorNumber=EPERM
|
|
SystemCallFilter=@system-service bpf perf_event_open
|