Module: ngircd.git Branch: master Commit: 76f40bdb988440a73431eb14a27f30aeaa18ebe5 URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=76f40...
Author: Alexander Barton alex@barton.de Date: Tue Oct 26 15:13:24 2010 +0200
Xcode builds ("make xcode"): disable pam_fail_delay()
disable pam_fail_delay() only is available starting with Mac OS X 10.6; but we use the 10.5 SDK for campatibility, so don't use this function at all when building using Xcode.
---
contrib/MacOSX/config.h | 2 ++ src/ngircd/pam.c | 2 +- 2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/contrib/MacOSX/config.h b/contrib/MacOSX/config.h index 0da178d..ba5e7e6 100644 --- a/contrib/MacOSX/config.h +++ b/contrib/MacOSX/config.h @@ -115,6 +115,8 @@ #define HAVE_PAM_AUTHENTICATE 1 /* Define to 1 if you have the <pam/pam_appl.h> header file. */ #define HAVE_PAM_PAM_APPL_H 1 +/* Mac OS X <10.6 doesn't have pam_fail_delay() */ +#define NO_PAM_FAIL_DELAY 1 #endif
/* -eof- */ diff --git a/src/ngircd/pam.c b/src/ngircd/pam.c index e6d25bc..0d4f27f 100644 --- a/src/ngircd/pam.c +++ b/src/ngircd/pam.c @@ -111,7 +111,7 @@ PAM_Authenticate(CLIENT *Client) {
pam_set_item(pam, PAM_RUSER, Client_User(Client)); pam_set_item(pam, PAM_RHOST, Client_Hostname(Client)); -#ifdef HAVE_PAM_FAIL_DELAY +#if defined(HAVE_PAM_FAIL_DELAY) && !defined(NO_PAM_FAIL_DELAY) pam_fail_delay(pam, 0); #endif