kanidm/unix_integration/resolver/debian/kanidm-unixd.service
Jinna Kiisuo 1e91f244a2
packaging: Add kanidmd deb package, update documentation ()
* packaging: Use cargo-deb multiarch support

This allows building all platforms from one definition,
assuming the --multiarch=foreign flag is used.

* packaging: Use correct path naming for unixd service files

While cargo-deb works around the mistake, better to name them as per the
rules: https://github.com/kornelski/cargo-deb/blob/main/systemd.md#systemd-unit-file-naming

* docs: Update book chapter on Debian packaging

* packaging: Shift Debian builds to a separate build profile

* packaging: Add deb for kanidmd
2025-03-18 12:10:42 +10:00

50 lines
1.4 KiB
Desktop File

# 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
After=chronyd.service nscd.service ntpd.service network-online.target
Before=systemd-user-sessions.service sshd.service nss-user-lookup.target
Wants=nss-user-lookup.target
# While it seems confusing, we need to be after nscd.service so that the
# Conflicts will trigger and then automatically stop it.
Conflicts=nscd.service
[Service]
DynamicUser=yes
SupplementaryGroups=tss
UMask=0027
CacheDirectory=kanidm-unixd
RuntimeDirectory=kanidm-unixd
StateDirectory=kanidm-unixd
Type=notify
ExecStart=/usr/sbin/kanidm_unixd
# auth going down is bad, but infinite speedlooping is worse
Restart=always
RestartSec=30
# 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
# Older versions of systemd require this to be explicitly allowed.
DeviceAllow=/dev/tpmrm0 rw
ProtectHostname=true
ProtectClock=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
MemoryDenyWriteExecute=true
[Install]
WantedBy=multi-user.target