Browse Source

Let crypt_checkpass() set EACCES after bcrypt_checkpass() failure;

ok tedu@
OPENBSD_5_7
schwarze 10 years ago
parent
commit
bfe8beac85
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      src/lib/libc/crypt/cryptutil.c

+ 4
- 2
src/lib/libc/crypt/cryptutil.c View File

@ -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> * Copyright (c) 2014 Ted Unangst <tedu@openbsd.org>
* *
@ -38,7 +38,9 @@ crypt_checkpass(const char *pass, const char *goodhash)
return 0; return 0;
if (goodhash[0] == '$' && goodhash[1] == '2') { 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 */ /* have to do it the hard way */


Loading…
Cancel
Save