From 72eba0cc83b2df9c0b52cd8559ad35dcea31293c Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 12 May 2005 08:02:46 +0000 Subject: [PATCH] Configure enables the use the crypt API - if available. --- NEWS | 4 +++- configure.in | 8 +++++++- util/passwddb.c | 12 ++++-------- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/NEWS b/NEWS index a7954a0..aabf39f 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ---- 1.3.26 2005/05/04 +--- 1.3.26 2005/05/XX + +Configure enables the use the crypt API - if available. Fixed bug #304: Fuzzy search regExpr-2 did not use proper error distance of 1. diff --git a/configure.in b/configure.in index f5e5bed..0ac7da5 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl Zebra, Index Data Aps, 1995-2005 -dnl $Id: configure.in,v 1.91.2.10 2005-05-04 11:48:13 adam Exp $ +dnl $Id: configure.in,v 1.91.2.11 2005-05-12 08:02:47 adam Exp $ dnl AC_INIT(include/zebraver.h) AM_INIT_AUTOMAKE(idzebra,1.3.26) @@ -81,6 +81,12 @@ dnl dnl ------ times AC_CHECK_HEADERS(sys/times.h) dnl +dnl ------ crypt +AC_CHECK_LIB(crypt, crypt) +if test "$ac_cv_lib_crypt_crypt" = "yes"; then + AC_CHECK_HEADERS(crypt.h) +fi +dnl dnl ------ mkstemp AC_CHECK_FUNCS(mkstemp) dnl diff --git a/util/passwddb.c b/util/passwddb.c index 3db6189..9a7db71 100644 --- a/util/passwddb.c +++ b/util/passwddb.c @@ -1,4 +1,4 @@ -/* $Id: passwddb.c,v 1.7 2002-08-02 19:26:57 adam Exp $ +/* $Id: passwddb.c,v 1.7.2.1 2005-05-12 08:02:47 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 Index Data Aps @@ -28,11 +28,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include -#ifndef USE_CRYPT -#define USE_CRYPT 0 -#endif - -#if USE_CRYPT +#if HAVE_CRYPT_H #include #endif @@ -128,7 +124,7 @@ void passwd_db_show (Passwd_db db) int passwd_db_auth (Passwd_db db, const char *user, const char *pass) { struct passwd_entry *pe; -#if USE_CRYPT +#if HAVE_CRYPT_H char salt[3]; const char *des_try; #endif @@ -137,7 +133,7 @@ int passwd_db_auth (Passwd_db db, const char *user, const char *pass) break; if (!pe) return -1; -#if USE_CRYPT +#if HAVE_CRYPT_H if (strlen (pe->des) < 3) return -3; if (!pass) -- 1.7.10.4