]> git.sur5r.net Git - openldap/commitdiff
sync with HEAD
authorKurt Zeilenga <kurt@openldap.org>
Fri, 31 Dec 2004 12:01:17 +0000 (12:01 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 31 Dec 2004 12:01:17 +0000 (12:01 +0000)
libraries/libldap/error.c
servers/slapd/schema/test.schema [deleted file]
tests/data/slapd-component.conf
tests/data/test.schema [new file with mode: 0644]

index 2388238558e13bb1f2c4157fabd6790dcd1b0211..c6ac44b9b024ab426a8aa3ecf317c8b47a53a0fa 100644 (file)
@@ -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 (file)
index 0fca741..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-# OpenLDAP Test schema
-# $OpenLDAP$
-## This work is part of OpenLDAP Software <http://www.openldap.org/>.
-##
-## 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
-## <http://www.OpenLDAP.org/license.html>.
-#
-
-# 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 )
index 1d52888a2be75d35bc3477117188815b2ba3f55a..5c1739d1782b9542cf1fd789a76ffa9cc440cabf 100644 (file)
 ## <http://www.OpenLDAP.org/license.html>.
 
 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 (file)
index 0000000..0fca741
--- /dev/null
@@ -0,0 +1,33 @@
+# OpenLDAP Test schema
+# $OpenLDAP$
+## This work is part of OpenLDAP Software <http://www.openldap.org/>.
+##
+## 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
+## <http://www.OpenLDAP.org/license.html>.
+#
+
+# 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 )