2023-01-25 00:45:55 +01:00
|
|
|
# You should not need to edit this file. Instead, use a drop-in file by running:
|
|
|
|
# systemctl edit kanidm-unixd.service
|
|
|
|
|
|
|
|
[Unit]
|
|
|
|
Description=Kanidm Local Client Resolver
|
2024-02-16 03:24:37 +01:00
|
|
|
After=chronyd.service nscd.service ntpd.service network-online.target
|
|
|
|
Before=systemd-user-sessions.service sshd.service nss-user-lookup.target
|
2023-11-16 04:12:55 +01:00
|
|
|
Wants=nss-user-lookup.target
|
2024-02-16 03:24:37 +01:00
|
|
|
# While it seems confusing, we need to be after nscd.service so that the
|
2024-10-28 00:57:28 +01:00
|
|
|
# Conflicts will trigger and then automatically stop it.
|
2024-02-16 03:24:37 +01:00
|
|
|
Conflicts=nscd.service
|
2023-01-25 00:45:55 +01:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
DynamicUser=yes
|
2023-07-25 04:23:47 +02:00
|
|
|
SupplementaryGroups=tss
|
|
|
|
UMask=0027
|
|
|
|
CacheDirectory=kanidm-unixd
|
|
|
|
RuntimeDirectory=kanidm-unixd
|
2023-12-03 07:34:02 +01:00
|
|
|
StateDirectory=kanidm-unixd
|
|
|
|
|
2023-07-25 04:23:47 +02:00
|
|
|
|
2024-07-15 12:48:17 +02:00
|
|
|
Type=notify
|
2023-01-25 00:45:55 +01:00
|
|
|
ExecStart=/usr/sbin/kanidm_unixd
|
2023-12-03 07:34:02 +01:00
|
|
|
# auth going down is bad, but infinite speedlooping is worse
|
|
|
|
Restart=always
|
|
|
|
RestartSec=30
|
2023-01-25 00:45:55 +01:00
|
|
|
|
2023-07-25 04:23:47 +02:00
|
|
|
# Implied by dynamic user.
|
|
|
|
# ProtectHome=
|
|
|
|
# ProtectSystem=strict
|
|
|
|
# ReadWritePaths=/var/run/kanidm-unixd /var/cache/kanidm-unixd
|
|
|
|
|
|
|
|
# SystemCallFilter=@aio @basic-io @chown @file-system @io-event @network-io @sync
|
|
|
|
NoNewPrivileges=true
|
|
|
|
PrivateTmp=true
|
|
|
|
# We have to disable this to allow tpmrm0 access for tpm binding.
|
|
|
|
PrivateDevices=false
|
2024-02-27 03:13:31 +01:00
|
|
|
# Older versions of systemd require this to be explicitly allowed.
|
|
|
|
DeviceAllow=/dev/tpmrm0 rw
|
2023-07-25 04:23:47 +02:00
|
|
|
ProtectHostname=true
|
|
|
|
ProtectClock=true
|
|
|
|
ProtectKernelTunables=true
|
|
|
|
ProtectKernelModules=true
|
|
|
|
ProtectKernelLogs=true
|
|
|
|
ProtectControlGroups=true
|
|
|
|
MemoryDenyWriteExecute=true
|
2023-01-25 00:45:55 +01:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|