diff options
author | schwarze <> | 2014-11-21 12:32:38 +0000 |
---|---|---|
committer | schwarze <> | 2014-11-21 12:32:38 +0000 |
commit | d27b04843e857fcb0847d621fdf3f72096d8e552 (patch) | |
tree | ae33aeebbe624eafd8b86c136e1b1fcaa800116a /src/lib/libc/crypt | |
parent | f979161646cbb0dcb7a394df1cd4fbd92f440880 (diff) | |
download | openbsd-d27b04843e857fcb0847d621fdf3f72096d8e552.tar.gz openbsd-d27b04843e857fcb0847d621fdf3f72096d8e552.tar.bz2 openbsd-d27b04843e857fcb0847d621fdf3f72096d8e552.zip |
Let crypt_checkpass() set EACCES after bcrypt_checkpass() failure;
ok tedu@
Diffstat (limited to 'src/lib/libc/crypt')
-rw-r--r-- | src/lib/libc/crypt/cryptutil.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libc/crypt/cryptutil.c b/src/lib/libc/crypt/cryptutil.c index f9045ed601..cadc67af81 100644 --- a/src/lib/libc/crypt/cryptutil.c +++ b/src/lib/libc/crypt/cryptutil.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cryptutil.c,v 1.3 2014/11/21 05:13:44 tedu Exp $ */ | 1 | /* $OpenBSD: cryptutil.c,v 1.4 2014/11/21 12:32:38 schwarze Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> | 3 | * Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> |
4 | * | 4 | * |
@@ -38,7 +38,9 @@ crypt_checkpass(const char *pass, const char *goodhash) | |||
38 | return 0; | 38 | return 0; |
39 | 39 | ||
40 | if (goodhash[0] == '$' && goodhash[1] == '2') { | 40 | if (goodhash[0] == '$' && goodhash[1] == '2') { |
41 | return bcrypt_checkpass(pass, goodhash); | 41 | if (bcrypt_checkpass(pass, goodhash)) |
42 | goto fail; | ||
43 | return 0; | ||
42 | } | 44 | } |
43 | 45 | ||
44 | /* have to do it the hard way */ | 46 | /* have to do it the hard way */ |