CI / tests (Python 3.10) (pull_request) Successful in 22s
CI / tests (Python 3.11) (pull_request) Successful in 22s
CI / tests (Python 3.12) (pull_request) Successful in 21s
CI / tests (Python 3.13) (pull_request) Successful in 21s
CI / lint (pull_request) Successful in 2s
kernelwatch-livepatch.service runs canonical-livepatch as root with no network and a read-only filesystem, and a small python3 helper keeps the running kernel's state, check state, support, end-of-support date and fix count in /run/kernelwatch/livepatch. The agent (0.4.0) reads that file the way it reads needrestart's and never runs the snap itself. NoNewPrivileges=yes can't be used: snap-confine fails under it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
36 lines
1.1 KiB
Desktop File
36 lines
1.1 KiB
Desktop File
[Unit]
|
|
Description=Report kernel and update status to kernelwatch
|
|
Wants=network-online.target kernelwatch-needrestart.service kernelwatch-livepatch.service kernelwatch-apt-update.service
|
|
After=network-online.target apt-daily.service kernelwatch-needrestart.service kernelwatch-livepatch.service kernelwatch-apt-update.service
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
ExecStart=/usr/local/sbin/kernelwatch-agent
|
|
LoadCredential=token:/etc/kernelwatch/agent.token
|
|
|
|
# Everything the agent reads is world-readable, so it runs as a throwaway
|
|
# unprivileged user. The token credential is made readable to that user.
|
|
DynamicUser=yes
|
|
CapabilityBoundingSet=
|
|
AmbientCapabilities=
|
|
NoNewPrivileges=yes
|
|
ProtectSystem=strict
|
|
ProtectHome=yes
|
|
PrivateTmp=yes
|
|
PrivateDevices=yes
|
|
ProtectKernelTunables=yes
|
|
ProtectKernelModules=yes
|
|
ProtectKernelLogs=yes
|
|
ProtectControlGroups=yes
|
|
ProtectClock=yes
|
|
ProtectHostname=yes
|
|
RestrictNamespaces=yes
|
|
RestrictRealtime=yes
|
|
RestrictSUIDSGID=yes
|
|
LockPersonality=yes
|
|
MemoryDenyWriteExecute=yes
|
|
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
|
|
SystemCallArchitectures=native
|
|
SystemCallFilter=@system-service
|
|
UMask=0077
|