57 lines
2.1 KiB
Desktop File
57 lines
2.1 KiB
Desktop File
[Unit]
|
|
Description=RMM dedicated fixture APT helper (no generic root commands)
|
|
After=local-fs.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
# System services default to root. Avoid explicit User=root: systemd 255's
|
|
# seccomp setup otherwise drops CAP_SETUID and retains setup inheritable caps.
|
|
# Controller verification still requires euid 0, the exact capability sets,
|
|
# zero inherited/ambient caps, NNP and the full sandbox below.
|
|
Group=rmm-agent
|
|
Environment=RMM_HELPER_CONFIG=/etc/rmm/apt-helper.json
|
|
ExecStartPre=/usr/local/libexec/rmm-privileged-helper --probe-native
|
|
ExecStart=/usr/local/libexec/rmm-privileged-helper
|
|
WorkingDirectory=/
|
|
RuntimeDirectory=rmm-apt-helper
|
|
RuntimeDirectoryMode=0750
|
|
StateDirectory=rmm-helper rmm-apt-transaction
|
|
StateDirectoryMode=0700
|
|
UMask=0077
|
|
NoNewPrivileges=true
|
|
PrivateTmp=true
|
|
PrivateNetwork=true
|
|
PrivateDevices=no
|
|
DevicePolicy=strict
|
|
DeviceAllow=/dev/null rwm
|
|
DeviceAllow=/dev/zero rwm
|
|
DeviceAllow=/dev/random rwm
|
|
DeviceAllow=/dev/urandom rwm
|
|
ProtectSystem=strict
|
|
ProtectHome=true
|
|
ProtectKernelTunables=true
|
|
ProtectKernelModules=true
|
|
ProtectControlGroups=true
|
|
RestrictSUIDSGID=true
|
|
RestrictAddressFamilies=AF_UNIX
|
|
SystemCallArchitectures=native
|
|
RestrictNamespaces=mnt pid net
|
|
AmbientCapabilities=
|
|
CapabilityBoundingSet=CAP_CHOWN CAP_DAC_OVERRIDE CAP_FOWNER CAP_FSETID CAP_SETGID CAP_SETUID CAP_SETPCAP CAP_SETFCAP CAP_SYS_ADMIN CAP_MKNOD
|
|
# Trusted setup needs mount/unshare/fork/capset/prctl/seccomp. There is deliberately
|
|
# no outer @mount deny; the irreversible worker filter denies it after setup.
|
|
SystemCallFilter=~@reboot @module @raw-io @swap @clock @debug
|
|
# glibc implements the read-only adjtimex(modes=0) query via clock_adjtime on
|
|
# Ubuntu. Neither syscall can change time without CAP_SYS_TIME (not bounded).
|
|
# Keep all other @clock operations denied; never bypass trusted-clock checks.
|
|
SystemCallFilter=adjtimex clock_adjtime
|
|
SystemCallErrorNumber=EPERM
|
|
ReadWritePaths=/var/lib/dpkg /var/lib/rmm-helper /var/lib/rmm-apt-transaction /usr/share/rmm-mvp-test
|
|
Restart=on-failure
|
|
RestartSec=5s
|
|
TimeoutStopSec=infinity
|
|
KillMode=process
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|