mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-23 17:34:00 +03:00
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:
parent
e9252faee9
commit
2f67864064
@ -510,6 +510,8 @@ static int run(int argc, char *argv[]) {
|
|||||||
if (r <= 0)
|
if (r <= 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
|
cryptsetup_enable_logging(NULL);
|
||||||
|
|
||||||
if (arg_enroll_type < 0)
|
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 */
|
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
|
else
|
||||||
|
@ -1449,7 +1449,7 @@ static int run(int argc, char *argv[]) {
|
|||||||
|
|
||||||
log_setup();
|
log_setup();
|
||||||
|
|
||||||
cryptsetup_enable_logging(cd);
|
cryptsetup_enable_logging(NULL);
|
||||||
|
|
||||||
umask(0022);
|
umask(0022);
|
||||||
|
|
||||||
|
@ -138,6 +138,8 @@ static int run(int argc, char *argv[]) {
|
|||||||
|
|
||||||
log_setup();
|
log_setup();
|
||||||
|
|
||||||
|
cryptsetup_enable_logging(NULL);
|
||||||
|
|
||||||
umask(0022);
|
umask(0022);
|
||||||
|
|
||||||
if (streq(argv[1], "attach")) {
|
if (streq(argv[1], "attach")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user