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().
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
log_setup();
- cryptsetup_enable_logging(cd);
+ cryptsetup_enable_logging(NULL);
umask(0022);
log_setup();
+ cryptsetup_enable_logging(NULL);
+
umask(0022);
if (streq(argv[1], "attach")) {