Convert systemd-cryptsetup, systemd-cryptenroll, systemd-veritysetup
and systemd-integritysetup to go through the existing dlopen wrapper
for libcryptsetup instead of linking the library directly. Each binary
calls dlopen_cryptsetup() at the start of its run() and uses the sym_*
variants for every libcryptsetup entry point.
Extend cryptsetup-util.{h,c} to cover the libcryptsetup symbols that
these binaries use and that the wrapper was missing:
crypt_activate_by_token_pin, crypt_deactivate, crypt_init_data_device,
crypt_keyslot_status, crypt_set_keyring_to_link (conditional on
HAVE_CRYPT_SET_KEYRING_TO_LINK), crypt_status and
crypt_token_external_path.
With no direct callers of crypt_free() left, drop the non-sym
crypt_freep cleanup variant and rename sym_crypt_freep back to
crypt_freep via DEFINE_TRIVIAL_CLEANUP_FUNC_FULL_RENAME, matching the
naming convention used by other dlopen wrappers (acl_freep,
xkb_context_unrefp, ...). Update the remaining users in src/shared,
src/repart, src/home and src/growfs to the new name.
The four affected meson targets switch from libcryptsetup to
libcryptsetup_cflags so they no longer record a DT_NEEDED entry for
libcryptsetup.so.12.
20 lines
613 B
Meson
20 lines
613 B
Meson
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
|
|
if conf.get('HAVE_LIBCRYPTSETUP') != 1
|
|
subdir_done()
|
|
endif
|
|
|
|
executables += [
|
|
libexec_template + {
|
|
'name' : 'systemd-integritysetup',
|
|
'sources' : files('integritysetup.c'),
|
|
'extract' : files('integrity-util.c'),
|
|
'dependencies' : libcryptsetup_cflags,
|
|
},
|
|
generator_template + {
|
|
'name' : 'systemd-integritysetup-generator',
|
|
'sources' : files('integritysetup-generator.c'),
|
|
'objects' : ['systemd-integritysetup'],
|
|
},
|
|
]
|