summaryrefslogtreecommitdiff
path: root/src/reply-password
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-02-05 20:05:27 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-02-05 21:07:55 -0500
commit2d26d8e07ee680995f96597a1cd713dd81491b89 (patch)
treeca66e286a3319e1edf1d473d7d519c145596ac37 /src/reply-password
parent52e634271fe96ec23a22705ffb87df59a09d1618 (diff)
downloadsystemd-2d26d8e07ee680995f96597a1cd713dd81491b89.tar.gz
treewide: replace homegrown memory_erase with explicit_bzero
explicit_bzero was added in glibc 2.25. Make use of it. explicit_bzero is hardcoded to zero the memory, so string erase now truncates the string, instead of overwriting it with 'x'. This causes a visible difference only in the journalctl case.
Diffstat (limited to 'src/reply-password')
-rw-r--r--src/reply-password/reply-password.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/reply-password/reply-password.c b/src/reply-password/reply-password.c
index 17eab9772e..a17c8a62b8 100644
--- a/src/reply-password/reply-password.c
+++ b/src/reply-password/reply-password.c
@@ -90,7 +90,7 @@ int main(int argc, char *argv[]) {
r = send_on_socket(fd, argv[2], packet, length);
finish:
- memory_erase(packet, sizeof(packet));
+ explicit_bzero(packet, sizeof(packet));
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
}