cryptsetup_set_minimal_pbkdf(), cryptsetup_get_token_as_json() and
cryptsetup_add_token_json() each take a struct crypt_device *cd, which
can only be obtained by first calling sym_crypt_init*() — and that
already requires dlopen_cryptsetup() to have succeeded. The internal
calls here were only implicitly re-loading a library the caller is
guaranteed to have already loaded.
/* Sets a minimal PKBDF in case we already have a high entropy key. */
- r = dlopen_cryptsetup(LOG_DEBUG);
- if (r < 0)
- return r;
-
r = sym_crypt_set_pbkdf_type(cd, &minimal_pbkdf);
if (r < 0)
return r;
* -EMEDIUMTYPE → "verify_type" specified and doesn't match token's type
*/
- r = dlopen_cryptsetup(LOG_DEBUG);
- if (r < 0)
- return r;
-
r = sym_crypt_token_json_get(cd, idx, &text);
if (r < 0)
return r;
_cleanup_free_ char *text = NULL;
int r;
- r = dlopen_cryptsetup(LOG_DEBUG);
- if (r < 0)
- return r;
-
r = sd_json_variant_format(v, 0, &text);
if (r < 0)
return log_debug_errno(r, "Failed to format token data for LUKS: %m");