am b25302e1: Do not log passwords returned through vdc
* commit 'b25302e1b0232ac2f9d6ffa441f2ab1ff23a2de3':
Do not log passwords returned through vdc
diff --git a/CommandListener.cpp b/CommandListener.cpp
index 4c65959..f135a01 100644
--- a/CommandListener.cpp
+++ b/CommandListener.cpp
@@ -710,8 +710,14 @@
dumpArgs(argc, argv, -1);
char* password = cryptfs_get_password();
if (password) {
- cli->sendMsg(ResponseCode::CommandOkay, password, false);
- return 0;
+ char* message = 0;
+ int size = asprintf(&message, "{{sensitive}} %s", password);
+ if (size != -1) {
+ cli->sendMsg(ResponseCode::CommandOkay, message, false);
+ memset(message, 0, size);
+ free (message);
+ return 0;
+ }
}
rc = -1;
} else if (!strcmp(argv[1], "clearpw")) {