diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2014-11-11 21:06:25 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2014-11-11 21:06:25 +0000 |
commit | 7d30bda10a0a0d44d5a0bae94b9b6dd705421a2e (patch) | |
tree | cc6cfe4b4ff67c0786919a99a6e719ba58cd7889 | |
parent | 0f0454a3e3a7965dd26160d19dc445ecdfee3f10 (diff) |
use crypt_checkpass instead of crypt/strcmp
-rw-r--r-- | usr.bin/passwd/local_passwd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/passwd/local_passwd.c b/usr.bin/passwd/local_passwd.c index 1ad540d63d7..c135aeecb7a 100644 --- a/usr.bin/passwd/local_passwd.c +++ b/usr.bin/passwd/local_passwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: local_passwd.c,v 1.41 2013/01/18 11:13:38 guenther Exp $ */ +/* $OpenBSD: local_passwd.c,v 1.42 2014/11/11 21:06:24 tedu Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -163,7 +163,7 @@ getnewpasswd(struct passwd *pw, login_cap_t *lc, int authenticated) pw_abort(); exit(p == NULL ? 1 : 0); } - if (strcmp(crypt(p, pw->pw_passwd), pw->pw_passwd)) { + if (crypt_checkpass(p, pw->pw_passwd) != 0) { errno = EACCES; pw_error(NULL, 1, 1); } |