diff options
author | 2014-11-21 12:32:38 +0000 | |
---|---|---|
committer | 2014-11-21 12:32:38 +0000 | |
commit | 9f74fb3b5a4a409686be068040792d21eb37ccc8 (patch) | |
tree | 968af29f1203bf9029be70517dc8ab602cc5cfb6 /lib/libc/crypt/cryptutil.c | |
parent | We can map 'fuse ROM' area with read only. (diff) | |
download | wireguard-openbsd-9f74fb3b5a4a409686be068040792d21eb37ccc8.tar.xz wireguard-openbsd-9f74fb3b5a4a409686be068040792d21eb37ccc8.zip |
Let crypt_checkpass() set EACCES after bcrypt_checkpass() failure;
ok tedu@
Diffstat (limited to 'lib/libc/crypt/cryptutil.c')
-rw-r--r-- | lib/libc/crypt/cryptutil.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/crypt/cryptutil.c b/lib/libc/crypt/cryptutil.c index f9045ed601d..cadc67af81f 100644 --- a/lib/libc/crypt/cryptutil.c +++ b/lib/libc/crypt/cryptutil.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cryptutil.c,v 1.3 2014/11/21 05:13:44 tedu Exp $ */ +/* $OpenBSD: cryptutil.c,v 1.4 2014/11/21 12:32:38 schwarze Exp $ */ /* * Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> * @@ -38,7 +38,9 @@ crypt_checkpass(const char *pass, const char *goodhash) return 0; if (goodhash[0] == '$' && goodhash[1] == '2') { - return bcrypt_checkpass(pass, goodhash); + if (bcrypt_checkpass(pass, goodhash)) + goto fail; + return 0; } /* have to do it the hard way */ |