cryptsetup: explicitl set default log functions wherever needed

Code using libcryptsetup already sets the global log function if it uses
dlopen_cryptsetup(). Make sure we do the same for the three programs
that explicitly link against libcryptsetup and hence to not use
dlopen_cryptsetup().
This commit is contained in:
Lennart Poettering
2021-06-01 13:33:09 +02:00
parent e9252faee9
commit 2f67864064
3 changed files with 5 additions and 1 deletions
+2
View File
@@ -510,6 +510,8 @@ static int run(int argc, char *argv[]) {
if (r <= 0)
return r;
cryptsetup_enable_logging(NULL);
if (arg_enroll_type < 0)
r = prepare_luks(&cd, NULL, NULL); /* No need to unlock device if we don't need the volume key because we don't need to enroll anything */
else
+1 -1
View File
@@ -1449,7 +1449,7 @@ static int run(int argc, char *argv[]) {
log_setup();
cryptsetup_enable_logging(cd);
cryptsetup_enable_logging(NULL);
umask(0022);
+2
View File
@@ -138,6 +138,8 @@ static int run(int argc, char *argv[]) {
log_setup();
cryptsetup_enable_logging(NULL);
umask(0022);
if (streq(argv[1], "attach")) {