HALF ECHO LEARN / REFERENCE COLLECTION

v262.2

src/shared/initrd-cpio.h

Git blob: 33dc298e44b746ce6e7bf571db76efa77939eb47

Lines 1–15 of 15

/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
 
#include "forward.h"
 
/* Builds a new CPIO archive containing each credential as a
 * file under .extra/system_credentials/<id>.cred, writes it to a
 * freshly-created temp file, and returns the path in *ret_path.
 * Caller takes ownership and is responsible for unlink()+free().
 * If creds contains no credentials, no file will be created and
 * *ret_path is set to NULL. */
int initrd_cpio_credentials_to_tempfile(
                const MachineCredentialContext *creds,
                char **ret_path);