53 lines
1.7 KiB
Desktop File
53 lines
1.7 KiB
Desktop File
[Unit]
|
|
Description=RMM dedicated fixture APT helper (no generic root commands)
|
|
After=local-fs.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=root
|
|
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
|
|
# Existing helper clock trust reads adjtimex(modes=0). Mutating adjtimex still
|
|
# requires CAP_SYS_TIME, absent from the bounding set; other @clock calls denied.
|
|
SystemCallFilter=adjtimex
|
|
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
|