Commit c0927398 authored by Bradley Nicholes's avatar Bradley Nicholes
Browse files

Return the correct error when the user object is not found


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105697 13f79535-47bb-0310-9956-ffa450edef68
parent 549f4d5f
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -402,12 +402,10 @@ start_over:
                      "[%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 */