HALF ECHO LEARN / REFERENCE COLLECTION

v262.2

units/systemd-tpm2-swtpm.service.in

1,547 bytesGit mode 100644Download original fileLGPL-2.1-or-later

Git blob: d7accfb330a15a2a65d3f2a0c31a80630645d7cb

Lines 1–50 of 50

#  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=Fallback Software TPM
Documentation=man:systemd-tpm2-swtpm.service(8)
DefaultDependencies=no
Conflicts=shutdown.target initrd-switch-root.target
After=systemd-sysusers.service
Wants=modprobe@tpm_vtpm_proxy.service
After=modprobe@tpm_vtpm_proxy.service
Before=tpm2.target sysinit.target shutdown.target initrd-switch-root.target
 
[Service]
CapabilityBoundingSet=CAP_SYS_ADMIN
ExecStart={{LIBEXECDIR}}/systemd-tpm2-swtpm
# Write out volatile state (so that we can read it back after the initrd transition
ExecStop=swtpm_ioctl --unix %t/systemd/swtpm/socket -v
# Initiate graceful shutdown
ExecStop=swtpm_ioctl --unix %t/systemd/swtpm/socket -s
LockPersonality=yes
MemoryDenyWriteExecute=yes
NoNewPrivileges=yes
PrivateNetwork=yes
PrivateTmp=disconnected
ProtectControlGroups=yes
ProtectHome=yes
ProtectHostname=yes
ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectProc=invisible
RestrictAddressFamilies=AF_UNIX AF_NETLINK
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
RuntimeDirectory=systemd/swtpm
RuntimeDirectoryMode=0700
SystemCallArchitectures=native
SystemCallErrorNumber=EPERM
SystemCallFilter=@system-service
Type=notify
UMask=0077