summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2015-09-22 21:47:37 +0000
committermillert <millert@openbsd.org>2015-09-22 21:47:37 +0000
commit48d9b361bc845d027805796e44717a17980f0b44 (patch)
treeb409052ce8d8c3cc0ea5d015843239b85cda84fb
parentMake sure the openbsd.randomdata section is located before the edata symbol. (diff)
downloadwireguard-openbsd-48d9b361bc845d027805796e44717a17980f0b44.tar.xz
wireguard-openbsd-48d9b361bc845d027805796e44717a17980f0b44.zip
Use explicit_bzero() to zero out the password. From Michael McConville.
-rw-r--r--libexec/login_yubikey/login_yubikey.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/login_yubikey/login_yubikey.c b/libexec/login_yubikey/login_yubikey.c
index 8580a836a8b..d5ab3c69446 100644
--- a/libexec/login_yubikey/login_yubikey.c
+++ b/libexec/login_yubikey/login_yubikey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: login_yubikey.c,v 1.10 2015/01/16 06:39:50 deraadt Exp $ */
+/* $OpenBSD: login_yubikey.c,v 1.11 2015/09/22 21:47:37 millert Exp $ */
/*
* Copyright (c) 2010 Daniel Hartmeier <daniel@benzedrine.cx>
@@ -152,7 +152,7 @@ main(int argc, char *argv[])
}
ret = yubikey_login(username, password);
- memset(password, 0, strlen(password));
+ explicit_bzero(password, strlen(password));
if (ret == AUTH_OK) {
syslog(LOG_INFO, "user %s: authorize", username);
fprintf(f, "%s\n", BI_AUTH);