From b8ec6f940633172154baf32a3723b4ff8b000bc2 Mon Sep 17 00:00:00 2001 From: tedu Date: Thu, 22 Oct 2015 12:52:15 +0000 Subject: [PATCH] use crypt_checkpass to check password --- libexec/rpc.yppasswdd/yppasswdd_mkpw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)) -- 2.20.1