mirror of
https://github.com/systemd/systemd.git
synced 2026-08-09 09:32:04 +00:00
Add a Varlink interface for systemd-cryptenroll, building on the EnrollContext introduced previously. A single Enroll method covers password, recovery-key and FIDO2 enrollment; PKCS#11 and TPM2 are not exposed for now (they are not part of the EnrollMechanism allowlist, so the generic InvalidParameter error applies). A ListSlots method enumerates the currently enrolled keyslots. The dispatcher populates the same EnrollContext the command line uses and then runs the shared enroll_now()/prepare_luks()/wipe_slots() paths, so both front-ends behave identically. FIDO2 enrollment that requires user presence reports an imminent touch via a non-terminating "state":"touch" reply when the caller passes 'more'. Credential material (password, FIDO2 PIN, recovery key) is handled as sensitive, and key files may be passed either by path or as an fd index. The server is allocated root-only plus caller's-own-UID, with the listening socket created in 0644 mode. Replaces: #31096
26 lines
785 B
SYSTEMD
26 lines
785 B
SYSTEMD
# 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=Disk Encryption Enrollment Service Socket
|
|
Documentation=man:systemd-cryptenroll(1)
|
|
DefaultDependencies=no
|
|
Before=sockets.target
|
|
|
|
[Socket]
|
|
ListenStream=/run/systemd/io.systemd.CryptEnroll
|
|
Symlinks=/run/varlink/registry/io.systemd.CryptEnroll
|
|
FileDescriptorName=varlink
|
|
SocketMode=0644
|
|
Accept=yes
|
|
MaxConnectionsPerSource=16
|
|
XAttrEntryPoint=user.varlink=entrypoint
|
|
XAttrListen=user.varlink=listen
|
|
XAttrAccept=user.varlink=server
|