From: tedu Date: Thu, 22 Oct 2015 12:52:15 +0000 (+0000) Subject: use crypt_checkpass to check password X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b8ec6f940633172154baf32a3723b4ff8b000bc2;p=openbsd use crypt_checkpass to check password --- diff --git a/libexec/rpc.yppasswdd/yppasswdd_mkpw.c b/libexec/rpc.yppasswdd/yppasswdd_mkpw.c index 260115e65d0..514cb240ff4 100644 --- a/libexec/rpc.yppasswdd/yppasswdd_mkpw.c +++ b/libexec/rpc.yppasswdd/yppasswdd_mkpw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: yppasswdd_mkpw.c,v 1.31 2013/11/27 21:25:40 deraadt Exp $ */ +/* $OpenBSD: yppasswdd_mkpw.c,v 1.32 2015/10/22 12:52:15 tedu Exp $ */ /* * Copyright (c) 1994 Mats O Jansson @@ -169,7 +169,7 @@ make_passwd(yppasswd *argp) EXPAND(pw.pw_dir); EXPAND(pw.pw_shell); - if (strcmp(crypt(argp->oldpass, pw.pw_passwd), pw.pw_passwd) != 0) + if (crypt_checkpass(argp->oldpass, pw.pw_passwd) != 0) goto fail; if (!nopw && badchars(argp->newpw.pw_passwd))