summaryrefslogtreecommitdiff
blob: 21872e73cb7c53c89e5169c9b8c0927c71abe089 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From 3024af3685be9eb618352bd17ba37953d8076946 Mon Sep 17 00:00:00 2001
From: Christian Beier <dontmind@freeshell.org>
Date: Thu, 17 Jan 2019 14:05:53 +0100
Subject: [PATCH] unixpw: don't try to use crypt() when it isn't available

Closes #86
---
 src/unixpw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/unixpw.c b/src/unixpw.c
index 9a43cec..e2cb016 100644
--- a/src/unixpw.c
+++ b/src/unixpw.c
@@ -757,7 +757,7 @@ int unixpw_list_match(char *user) {
 }
 
 int crypt_verify(char *user, char *pass) {
-#ifndef UNIXPW_CRYPT
+#if !defined UNIXPW_CRYPT || !defined HAVE_LIBCRYPT
 	return 0;
 #else
 	struct passwd *pwd;