/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2006 The OpenLDAP Foundation.
+ * Copyright 1998-2008 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* top-level directory of the distribution or, alternatively, at
* <http://www.OpenLDAP.org/license.html>.
*/
-/* Portions Copyright (C) The Internet Society (1997)
- * ASN.1 fragments are from RFC 2251; see RFC for full legal notices.
- */
#include "portable.h"
{LDAP_IS_LEAF, N_("Entry is a leaf")},
{LDAP_ALIAS_DEREF_PROBLEM, N_("Alias dereferencing problem")},
- {LDAP_PROXY_AUTHZ_FAILURE, N_("Proxy Authorization Failure")},
{LDAP_INAPPROPRIATE_AUTH, N_("Inappropriate authentication")},
{LDAP_INVALID_CREDENTIALS, N_("Invalid credentials")},
{LDAP_INSUFFICIENT_ACCESS, N_("Insufficient access")},
{LDAP_ASSERTION_FAILED, N_("Assertion Failed")},
{LDAP_X_ASSERTION_FAILED, N_("Assertion Failed (X)")},
+ {LDAP_PROXIED_AUTHORIZATION_DENIED, N_("Proxied Authorization Denied")},
+ {LDAP_X_PROXY_AUTHZ_FAILURE, N_("Proxy Authorization Failure (X)")},
+
{LDAP_SYNC_REFRESH_REQUIRED, N_("Content Sync Refresh Required")},
{LDAP_X_SYNC_REFRESH_REQUIRED, N_("Content Sync Refresh Required (X)")},
{LDAP_CUP_UNSUPPORTED_SCHEME, N_("LCUP Unsupported Scheme")},
{LDAP_CUP_RELOAD_REQUIRED, N_("LCUP Reload Required")},
+#ifdef LDAP_X_TXN
+ {LDAP_X_TXN_SPECIFY_OKAY, N_("TXN specify okay")},
+ {LDAP_X_TXN_ID_INVALID, N_("TXN ID is invalid")},
+#endif
/* API ResultCodes */
{LDAP_SERVER_DOWN, N_("Can't contact LDAP server")},
#endif
/* Find the result, last msg in chain... */
lm = r->lm_chain_tail;
- if ((lm->lm_msgtype == LDAP_RES_SEARCH_ENTRY) ||
- (lm->lm_msgtype == LDAP_RES_SEARCH_REFERENCE) ||
- (lm->lm_msgtype == LDAP_RES_INTERMEDIATE)) {
- lm = NULL;
+ /* FIXME: either this is not possible (assert?)
+ * or it should be handled */
+ if ( lm != NULL ) {
+ switch ( lm->lm_msgtype ) {
+ case LDAP_RES_SEARCH_ENTRY:
+ case LDAP_RES_SEARCH_REFERENCE:
+ case LDAP_RES_INTERMEDIATE:
+ lm = NULL;
+ break;
+
+ default:
+ break;
+ }
}
if( lm == NULL ) {
ber = ber_dup( lm->lm_ber );
if ( ld->ld_version < LDAP_VERSION2 ) {
-#ifdef LDAP_NULL_IS_NULL
tag = ber_scanf( ber, "{iA}",
&ld->ld_errno, &ld->ld_error );
-#else /* ! LDAP_NULL_IS_NULL */
- tag = ber_scanf( ber, "{ia}",
- &ld->ld_errno, &ld->ld_error );
-#endif /* ! LDAP_NULL_IS_NULL */
} else {
ber_len_t len;
-#ifdef LDAP_NULL_IS_NULL
tag = ber_scanf( ber, "{iAA" /*}*/,
&ld->ld_errno, &ld->ld_matched, &ld->ld_error );
-#else /* ! LDAP_NULL_IS_NULL */
- tag = ber_scanf( ber, "{iaa" /*}*/,
- &ld->ld_errno, &ld->ld_matched, &ld->ld_error );
-#endif /* ! LDAP_NULL_IS_NULL */
if( tag != LBER_ERROR ) {
/* peek for referrals */
}
if ( errcode == LDAP_SUCCESS ) {
if( matcheddnp != NULL ) {
-#ifdef LDAP_NULL_IS_NULL
if ( ld->ld_matched )
-#endif /* LDAP_NULL_IS_NULL */
{
*matcheddnp = LDAP_STRDUP( ld->ld_matched );
}
}
if( errmsgp != NULL ) {
-#ifdef LDAP_NULL_IS_NULL
if ( ld->ld_error )
-#endif /* LDAP_NULL_IS_NULL */
{
*errmsgp = LDAP_STRDUP( ld->ld_error );
}