Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 51962 invoked from network); 5 Nov 2004 23:42:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 5 Nov 2004 23:42:31 -0000 Received: (qmail 83204 invoked by uid 500); 5 Nov 2004 23:42:29 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 83109 invoked by uid 500); 5 Nov 2004 23:42:24 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 82940 invoked by uid 500); 5 Nov 2004 23:42:20 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Received: (qmail 82909 invoked by uid 99); 5 Nov 2004 23:42:16 -0000 X-ASF-Spam-Status: No, hits=-10.0 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Fri, 05 Nov 2004 15:42:14 -0800 Received: (qmail 51712 invoked by uid 1285); 5 Nov 2004 23:41:38 -0000 Date: 5 Nov 2004 23:41:38 -0000 Message-ID: <20041105234138.51711.qmail@minotaur.apache.org> From: bnicholes@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/modules/aaa mod_authnz_ldap.c X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N bnicholes 2004/11/05 15:41:38 Modified: modules/aaa mod_authnz_ldap.c Log: Return the correct error when the user object is not found Revision Changes Path 1.9 +4 -6 httpd-2.0/modules/aaa/mod_authnz_ldap.c Index: mod_authnz_ldap.c =================================================================== RCS file: /home/cvs/httpd-2.0/modules/aaa/mod_authnz_ldap.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- mod_authnz_ldap.c 5 Nov 2004 18:48:16 -0000 1.8 +++ mod_authnz_ldap.c 5 Nov 2004 23:41:38 -0000 1.9 @@ -402,12 +402,10 @@ "[%d] auth_ldap authenticate: " "user %s authentication failed; URI %s [%s][%s]", getpid(), user, r->uri, ldc->reason, ldap_err2string(result)); - if (LDAP_INVALID_CREDENTIALS == result) { - return AUTH_DENIED; - } - else { - return AUTH_GENERAL_ERROR; - } + + return (LDAP_NO_SUCH_OBJECT == result) ? AUTH_USER_NOT_FOUND: \ + (LDAP_SECURITY_ERROR(result)) ? AUTH_DENIED: \ + AUTH_GENERAL_ERROR; } /* mark the user and DN */