From 7d30bda10a0a0d44d5a0bae94b9b6dd705421a2e Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Tue, 11 Nov 2014 21:06:25 +0000 Subject: use crypt_checkpass instead of crypt/strcmp --- usr.bin/passwd/local_passwd.c | 4 ++-- 1 file 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); } -- cgit v1.2.3