aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2019-01-30 23:35:25 +0100
committerDuncaen <mail@duncano.de>2019-01-30 23:35:25 +0100
commit38e072b353f5b1325bbf52dfb759fe49ff6ef0f7 (patch)
tree32bb92c93ab845848d0261fdabbb8911acab1476
parent55c5e6bdb8fb360553420550133775422204a55b (diff)
downloadopendoas-38e072b353f5b1325bbf52dfb759fe49ff6ef0f7.tar.gz
shadow: clear phassphrase earlier
-rw-r--r--shadow.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/shadow.c b/shadow.c
index 53877d5..71c71c6 100644
--- a/shadow.c
+++ b/shadow.c
@@ -70,14 +70,12 @@ shadowauth(const char *myname, int persist)
explicit_bzero(rbuf, sizeof(rbuf));
errx(1, "Authorization failed");
}
+ explicit_bzero(rbuf, sizeof(rbuf));
if (strcmp(encrypted, hash) != 0) {
- explicit_bzero(rbuf, sizeof(rbuf));
syslog(LOG_AUTHPRIV | LOG_NOTICE, "failed auth for %s", myname);
errx(1, "Authorization failed");
}
- explicit_bzero(rbuf, sizeof(rbuf));
-
#ifdef USE_TIMESTAMP
good:
if (fd != -1) {