1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

clear the password even after a mismatch

This commit is contained in:
tedu 2019-01-17 05:35:35 +00:00
parent 3873fb89f5
commit df2c09585a

View File

@ -1,4 +1,4 @@
/* $OpenBSD: doas.c,v 1.73 2018/08/08 18:32:51 deraadt Exp $ */
/* $OpenBSD: doas.c,v 1.74 2019/01/17 05:35:35 tedu Exp $ */
/*
* Copyright (c) 2015 Ted Unangst <tedu@openbsd.org>
*
@ -226,6 +226,7 @@ authuser(char *myname, char *login_style, int persist)
errx(1, "a tty is required");
}
if (!auth_userresponse(as, response, 0)) {
explicit_bzero(rbuf, sizeof(rbuf));
syslog(LOG_AUTHPRIV | LOG_NOTICE,
"failed auth for %s", myname);
errx(1, "Authorization failed");