OSDN Git Service
(root)
/
android-x86
/
system-vold.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb7d9af
)
Do not log passwords returned through vdc
author
Paul Lawrence
<paullawrence@google.com>
Tue, 11 Nov 2014 20:26:09 +0000
(12:26 -0800)
committer
Paul Lawrence
<paullawrence@google.com>
Tue, 2 Dec 2014 17:27:37 +0000
(09:27 -0800)
Requires framework change:
https://googleplex-android-review.git.corp.google.com/#/c/585511/
Bug:
18260068
Change-Id: I95d3bb39404ede7128b8f5d61ce2423a5f09a9b8
CommandListener.cpp
patch
|
blob
|
history
diff --git
a/CommandListener.cpp
b/CommandListener.cpp
index
4c65959
..
f135a01
100644
(file)
--- a/
CommandListener.cpp
+++ b/
CommandListener.cpp
@@
-710,8
+710,14
@@
int CommandListener::CryptfsCmd::runCommand(SocketClient *cli,
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")) {