From: Kurt Zeilenga Date: Fri, 31 Dec 2004 12:01:17 +0000 (+0000) Subject: sync with HEAD X-Git-Tag: OPENLDAP_REL_ENG_2_3_0ALPHA~4 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ad5ae407f8cf2e6e21d1177e43ee0134b06698eb;p=openldap sync with HEAD --- diff --git a/libraries/libldap/error.c b/libraries/libldap/error.c index 2388238558..c6ac44b9b0 100644 --- a/libraries/libldap/error.c +++ b/libraries/libldap/error.c @@ -110,6 +110,12 @@ static struct ldaperror ldap_builtin_errlist[] = { {LDAP_NO_OPERATION, N_("No Operation")}, {LDAP_ASSERTION_FAILED, N_("Assertion Failed")}, + {LDAP_CUP_RESOURCES_EXHAUSTED, N_("LCUP Resources Exhausted")}, + {LDAP_CUP_SECURITY_VIOLATION, N_("LCUP Security Violation")}, + {LDAP_CUP_INVALID_DATA, N_("LCUP Invalid Data")}, + {LDAP_CUP_UNSUPPORTED_SCHEME, N_("LCUP Unsupported Scheme")}, + {LDAP_CUP_RELOAD_REQUIRED, N_("LCUP Reload Required")}, + {LDAP_CANCELLED, N_("Cancelled")}, {LDAP_NO_SUCH_OPERATION, N_("No Operation to Cancel")}, {LDAP_TOO_LATE, N_("Too Late to Cancel")}, @@ -147,7 +153,20 @@ ldap_err2string( int err ) e = ldap_int_error( err ); - return e ? _(e->e_reason) : _("Unknown error"); + if (e) { + return e->e_reason; + + } else if ( LDAP_API_ERROR(err) ) { + return _("Unknown API error"); + + } else if ( LDAP_E_ERROR(err) ) { + return _("Unknown (extension) error"); + + } else if ( LDAP_X_ERROR(err) ) { + return _("Unknown (private extension) error"); + } + + return _("Unknown error"); } /* deprecated */ @@ -166,7 +185,7 @@ ldap_perror( LDAP *ld, LDAP_CONST char *str ) fprintf( stderr, "%s: %s (%d)\n", str ? str : "ldap_perror", - e ? _(e->e_reason) : _("unknown LDAP result code"), + e ? _(e->e_reason) : _("unknown result code"), ld->ld_errno ); if ( ld->ld_matched != NULL && ld->ld_matched[0] != '\0' ) { @@ -213,7 +232,7 @@ ldap_result2error( LDAP *ld, LDAPMessage *r, int freeit ) * BindResponse ::= [APPLICATION 1] SEQUENCE { * COMPONENTS OF LDAPResult, * serverSaslCreds [7] OCTET STRING OPTIONAL } - * + * * and ExtendedOp results: * * ExtendedResponse ::= [APPLICATION 24] SEQUENCE { diff --git a/servers/slapd/schema/test.schema b/servers/slapd/schema/test.schema deleted file mode 100644 index 0fca74166a..0000000000 --- a/servers/slapd/schema/test.schema +++ /dev/null @@ -1,33 +0,0 @@ -# OpenLDAP Test schema -# $OpenLDAP$ -## This work is part of OpenLDAP Software . -## -## Copyright 1998-2004 The OpenLDAP Foundation. -## All rights reserved. -## -## Redistribution and use in source and binary forms, with or without -## modification, are permitted only as authorized by the OpenLDAP -## Public License. -## -## A copy of this license is available in the file LICENSE in the -## top-level directory of the distribution or, alternatively, at -## . -# - -# For testing purposes only. - -# For Attribute Aliasing. -attributetype ( 1.3.6.1.4.1.4203.666.1.34 NAME 'x509CertificateIssuer' - EQUALITY distinguishedNameMatch - DESC 'Aliasing attribute: Issuer, use' - SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 ) - -attributetype ( 1.3.6.1.4.1.4203.666.1.35 NAME 'x509CertificateSerial' - DESC 'Aliasing attribute: Serial, use' - EQUALITY integerMatch - SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 ) - -attributetype ( 1.3.6.1.4.1.4203.666.1.36 NAME 'x509CertificateSerialAndIssuer' - DESC 'Aliasing attribute: Serial and Issuer together, use' - EQUALITY certificateExactMatch - SYNTAX 1.2.826.0.1.3344810.7.1 ) diff --git a/tests/data/slapd-component.conf b/tests/data/slapd-component.conf index 1d52888a2b..5c1739d178 100644 --- a/tests/data/slapd-component.conf +++ b/tests/data/slapd-component.conf @@ -15,12 +15,12 @@ ## . include ./schema/core.schema -include ./schema/test.schema include ./schema/cosine.schema include ./schema/inetorgperson.schema include ./schema/openldap.schema include ./schema/nis.schema +include ./testdata/test.schema include ./testdata/ditcontentrules.conf pidfile ./testrun/slapd.1.pid diff --git a/tests/data/test.schema b/tests/data/test.schema new file mode 100644 index 0000000000..0fca74166a --- /dev/null +++ b/tests/data/test.schema @@ -0,0 +1,33 @@ +# OpenLDAP Test schema +# $OpenLDAP$ +## This work is part of OpenLDAP Software . +## +## Copyright 1998-2004 The OpenLDAP Foundation. +## All rights reserved. +## +## Redistribution and use in source and binary forms, with or without +## modification, are permitted only as authorized by the OpenLDAP +## Public License. +## +## A copy of this license is available in the file LICENSE in the +## top-level directory of the distribution or, alternatively, at +## . +# + +# For testing purposes only. + +# For Attribute Aliasing. +attributetype ( 1.3.6.1.4.1.4203.666.1.34 NAME 'x509CertificateIssuer' + EQUALITY distinguishedNameMatch + DESC 'Aliasing attribute: Issuer, use' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 ) + +attributetype ( 1.3.6.1.4.1.4203.666.1.35 NAME 'x509CertificateSerial' + DESC 'Aliasing attribute: Serial, use' + EQUALITY integerMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 ) + +attributetype ( 1.3.6.1.4.1.4203.666.1.36 NAME 'x509CertificateSerialAndIssuer' + DESC 'Aliasing attribute: Serial and Issuer together, use' + EQUALITY certificateExactMatch + SYNTAX 1.2.826.0.1.3344810.7.1 )