Xcode builds ("make xcode"): disable pam_fail_delay()
authorAlexander Barton <alex@barton.de>
Tue, 26 Oct 2010 13:13:24 +0000 (15:13 +0200)
committerAlexander Barton <alex@barton.de>
Tue, 26 Oct 2010 13:13:24 +0000 (15:13 +0200)
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
src/ngircd/pam.c

index 0da178dd5cba72ce87d433f3155e115ad423049b..ba5e7e6a9b8917117d7511cbf44e79c37aabe86a 100644 (file)
 #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- */
index e6d25bc5c1d438481cfd1c024691b69141e2f92d..0d4f27f066c91dae8da42e21ec0f3136ce03af0a 100644 (file)
@@ -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