1 From 9b5f70b93e038df5446bd37a4adac5a0380748e7 Mon Sep 17 00:00:00 2001
2 From: johannes <johannes.brechtmann@gmail.com>
3 Date: Wed, 21 Feb 2018 23:57:11 +0100
4 Subject: [PATCH] crypt_checkpass: include HAVE_CRYPT_H definition, add NULL
8 openbsd-compat/crypt_checkpass.c | 9 ++++++++-
9 1 file changed, 8 insertions(+), 1 deletion(-)
11 diff --git a/openbsd-compat/crypt_checkpass.c b/openbsd-compat/crypt_checkpass.c
12 index dafd2dae..d10b3a57 100644
13 --- a/openbsd-compat/crypt_checkpass.c
14 +++ b/openbsd-compat/crypt_checkpass.c
16 /* OPENBSD ORIGINAL: lib/libc/crypt/cryptutil.c */
18 +#include "includes.h"
24 crypt_checkpass(const char *pass, const char *goodhash)
31 @@ -17,7 +20,11 @@ crypt_checkpass(const char *pass, const char *goodhash)
32 if (strlen(goodhash) == 0 && strlen(pass) == 0)
35 - if (strcmp(crypt(pass, goodhash), goodhash) == 0)
36 + c = crypt(pass, goodhash);
40 + if (strcmp(c, goodhash) == 0)