projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c71b2c
)
cryptsetup: enable libcryptsetup debug logging if we want it
author
Ivan Shapovalov
<intelfx@intelfx.name>
Sat, 6 Jul 2019 10:51:23 +0000
(13:51 +0300)
committer
Ivan Shapovalov
<intelfx@intelfx.name>
Mon, 8 Jul 2019 13:02:41 +0000
(16:02 +0300)
Even if we set a log callback that would accept debug messages, libcryptsetup
needs debug logging enabled explicitly for it to happen.
src/cryptsetup/cryptsetup.c
patch
|
blob
|
history
diff --git
a/src/cryptsetup/cryptsetup.c
b/src/cryptsetup/cryptsetup.c
index
54c7878
..
02f1310
100644
(file)
--- a/
src/cryptsetup/cryptsetup.c
+++ b/
src/cryptsetup/cryptsetup.c
@@
-638,6
+638,10
@@
static int run(int argc, char *argv[]) {
log_setup_service();
crypt_set_log_callback(NULL, cryptsetup_log_glue, NULL);
+ if (DEBUG_LOGGING)
+ /* libcryptsetup won't even consider debug messages by default */
+ crypt_set_debug_level(CRYPT_DEBUG_ALL);
+
umask(0022);
if (streq(argv[1], "attach")) {