summaryrefslogtreecommitdiffstats
path: root/modules/aaa/mod_authnz_ldap.c
diff options
context:
space:
mode:
authorBradley Nicholes <bnicholes@apache.org>2006-06-03 00:01:53 +0200
committerBradley Nicholes <bnicholes@apache.org>2006-06-03 00:01:53 +0200
commitda77cf56786bb917b16a49cbded72de17936f363 (patch)
tree68518ad9dff924ab071c6fca2a31ab479d144ffe /modules/aaa/mod_authnz_ldap.c
parent* Sync with 2.2.x CHANGES (diff)
downloadapache2-da77cf56786bb917b16a49cbded72de17936f363.tar.xz
apache2-da77cf56786bb917b16a49cbded72de17936f363.zip
Fix a problem with invalid auth error detection for LDAP client SDKs that don't support LDAP_SECURITY_ERROR macro. PR#39529
Submitted by: [Ray Price <dohrayme yahoo.com>], [Josh Fenlason <jfenlason ptc.com>] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@411306 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/aaa/mod_authnz_ldap.c')
-rw-r--r--modules/aaa/mod_authnz_ldap.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/aaa/mod_authnz_ldap.c b/modules/aaa/mod_authnz_ldap.c
index 8db03af91e..00efce62d1 100644
--- a/modules/aaa/mod_authnz_ldap.c
+++ b/modules/aaa/mod_authnz_ldap.c
@@ -405,6 +405,15 @@ start_over:
return (LDAP_NO_SUCH_OBJECT == result) ? AUTH_USER_NOT_FOUND
#ifdef LDAP_SECURITY_ERROR
: (LDAP_SECURITY_ERROR(result)) ? AUTH_DENIED
+#else
+ : (LDAP_INAPPROPRIATE_AUTH == result) ? AUTH_DENIED
+ : (LDAP_INVALID_CREDENTIALS == result) ? AUTH_DENIED
+#ifdef LDAP_INSUFFICIENT_ACCESS
+ : (LDAP_INSUFFICIENT_ACCESS == result) ? AUTH_DENIED
+#endif
+#ifdef LDAP_INSUFFICIENT_RIGHTS
+ : (LDAP_INSUFFICIENT_RIGHTS == result) ? AUTH_DENIED
+#endif
#endif
: AUTH_GENERAL_ERROR;
}