mirror of
https://github.com/systemd/systemd.git
synced 2026-07-25 16:55:44 +00:00
Currently, if user doesn't specify a key file, /etc/cryptsetup-keys.d/ and /run/cryptsetup-keys.d/ will be searched for a key file with name matching the volume name. But current implementation has an important flaw. When the auto-discovered key is a socket file - it will read the key only once, while the socket might provide different keys for different types of tokens. The issue is fixed by trying to discover the key on each unlock attempt, this way we can populate the socket bind name with something the key provider might use to differentiate between different keys it has to provide.
10 lines
240 B
C
10 lines
240 B
C
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
#pragma once
|
|
|
|
#include <inttypes.h>
|
|
#include <sys/types.h>
|
|
|
|
#include "iovec-util.h"
|
|
|
|
int find_key_file(const char *key_file, char **search_path, const char *bindname, struct iovec *ret_key);
|