]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: never link directly against p11kit
authorLennart Poettering <lennart@poettering.net>
Thu, 2 Nov 2023 13:47:35 +0000 (14:47 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 2 Nov 2023 17:26:46 +0000 (17:26 +0000)
We go via dlopen() at most places, but forgot some. Cover the missing
cases too.

src/cryptenroll/meson.build
src/cryptsetup/cryptsetup-tokens/luks2-pkcs11.c
src/cryptsetup/cryptsetup-tokens/meson.build
src/cryptsetup/meson.build
src/home/homework-pkcs11.c
src/home/meson.build

index fa171ea47a565d78e2d1f438b2a0b6f252c29dc1..5374d65aba6cb41c37577d28de37742d158ec0bc 100644 (file)
@@ -30,7 +30,7 @@ executables += [
                         libcryptsetup,
                         libdl,
                         libopenssl,
-                        libp11kit,
+                        libp11kit_cflags,
                 ],
         },
 ]
index 4bbec0fe1ad398558258d78cf1dbc44756b1d5ed..98fd83a014c4765df15e93b84a1b47123249b1ab 100644 (file)
@@ -55,7 +55,7 @@ static int luks2_pkcs11_callback(
                 if (rv != CKR_OK) {
                         crypt_log_error(data->cd,
                                        "Failed to acquire updated security token information for slot %lu: %s",
-                                       slot_id, p11_kit_strerror(rv));
+                                       slot_id, sym_p11_kit_strerror(rv));
                         return -EIO;
                 }
                 token_info = &updated_token_info;
index 88665202a0dc535424ff9811ca0f81384ea0fe24..b26940c6a3b10079fc70afabb158558518d72835 100644 (file)
@@ -69,7 +69,7 @@ modules += [
                 'sources' : cryptsetup_token_systemd_pkcs11_sources,
                 'dependencies' : [
                         libcryptsetup,
-                        libp11kit,
+                        libp11kit_cflags,
                 ],
         },
 ]
index e034cb7d244a3c24dadc6fbddd9725996c2154ed..90e2be7a911ef1224bce84ed554151cf35c5f384 100644 (file)
@@ -24,7 +24,7 @@ executables += [
                 'dependencies' : [
                         libcryptsetup,
                         libopenssl,
-                        libp11kit,
+                        libp11kit_cflags,
                 ],
         },
         generator_template + {
index be9d905c0e4142c43554f5e70312633f7d4a9c09..f3719948d0186e0f072e12b190d13a8ede5b0541 100644 (file)
@@ -49,7 +49,7 @@ int pkcs11_callback(
 
                 rv = m->C_Login(session, CKU_USER, NULL, 0);
                 if (rv != CKR_OK)
-                        return log_error_errno(SYNTHETIC_ERRNO(EIO), "Failed to log into security token '%s': %s", token_label, p11_kit_strerror(rv));
+                        return log_error_errno(SYNTHETIC_ERRNO(EIO), "Failed to log into security token '%s': %s", token_label, sym_p11_kit_strerror(rv));
 
                 log_info("Successfully logged into security token '%s' via protected authentication path.", token_label);
                 goto decrypt;
@@ -72,12 +72,12 @@ int pkcs11_callback(
                 if (rv == CKR_PIN_LOCKED)
                         return log_error_errno(SYNTHETIC_ERRNO(EOWNERDEAD), "PIN of security token is blocked. Please unblock it first.");
                 if (!IN_SET(rv, CKR_PIN_INCORRECT, CKR_PIN_LEN_RANGE))
-                        return log_error_errno(SYNTHETIC_ERRNO(EIO), "Failed to log into security token '%s': %s", token_label, p11_kit_strerror(rv));
+                        return log_error_errno(SYNTHETIC_ERRNO(EIO), "Failed to log into security token '%s': %s", token_label, sym_p11_kit_strerror(rv));
         }
 
         rv = m->C_GetTokenInfo(slot_id, &updated_token_info);
         if (rv != CKR_OK)
-                return log_error_errno(SYNTHETIC_ERRNO(EIO), "Failed to acquire updated security token information for slot %lu: %s", slot_id, p11_kit_strerror(rv));
+                return log_error_errno(SYNTHETIC_ERRNO(EIO), "Failed to acquire updated security token information for slot %lu: %s", slot_id, sym_p11_kit_strerror(rv));
 
         if (FLAGS_SET(updated_token_info.flags, CKF_USER_PIN_FINAL_TRY))
                 return log_error_errno(SYNTHETIC_ERRNO(EUCLEAN), "PIN of security token incorrect, only a single try left.");
index b909cfdd47b92009851c2afe8410800da8218c0c..09831dee4529afa2678cbc22e99cece02b753c9b 100644 (file)
@@ -74,7 +74,7 @@ executables += [
                         libcrypt,
                         libfdisk,
                         libopenssl,
-                        libp11kit,
+                        libp11kit_cflags,
                         threads,
                 ],
         },
@@ -101,7 +101,7 @@ executables += [
                         libcrypt,
                         libdl,
                         libopenssl,
-                        libp11kit,
+                        libp11kit_cflags,
                         threads,
                 ],
         },