From 2dc6185a920b52f50bd86d627826cdf478b7383a Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 25 Apr 2000 13:06:22 +0000 Subject: [PATCH] LDAP_OPERATIONS_ERROR -> LDAP_OTHER and other misc changes --- servers/slapd/back-ldbm/backldbm.dsp | 4 ++++ servers/slapd/back-ldbm/delete.c | 14 +++++++------- servers/slapd/back-ldbm/modrdn.c | 22 +++++++++++----------- servers/slapd/back-ldbm/passwd.c | 7 ++++--- 4 files changed, 26 insertions(+), 21 deletions(-) diff --git a/servers/slapd/back-ldbm/backldbm.dsp b/servers/slapd/back-ldbm/backldbm.dsp index c7d136d3ab..bc98271e4c 100644 --- a/servers/slapd/back-ldbm/backldbm.dsp +++ b/servers/slapd/back-ldbm/backldbm.dsp @@ -42,6 +42,7 @@ CPP=cl.exe # PROP Output_Dir "..\..\..\Release" # PROP Intermediate_Dir "..\..\..\Release\backldbm" # PROP Target_Dir "" +RSC=rc.exe # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /I "..\\" /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c BSC32=bscmake.exe @@ -63,6 +64,7 @@ LIB32=link.exe -lib # PROP Output_Dir "..\..\..\Debug" # PROP Intermediate_Dir "..\..\..\Debug\backldbm" # PROP Target_Dir "" +RSC=rc.exe # ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c # ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "..\\" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR /YX /FD /c BSC32=bscmake.exe @@ -84,6 +86,7 @@ LIB32=link.exe -lib # PROP Output_Dir "..\..\..\SDebug" # PROP Intermediate_Dir "..\..\..\SDebug\backldbm" # PROP Target_Dir "" +RSC=rc.exe # ADD BASE CPP /nologo /MTd /W3 /GX /Z7 /Od /I "..\\" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR /YX /FD /c # ADD CPP /nologo /W3 /GX /Z7 /Od /I "..\\" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR /YX /FD /c BSC32=bscmake.exe @@ -105,6 +108,7 @@ LIB32=link.exe -lib # PROP Output_Dir "..\..\..\SRelease" # PROP Intermediate_Dir "..\..\..\SRelease\backldbm" # PROP Target_Dir "" +RSC=rc.exe # ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\\" /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c # ADD CPP /nologo /W3 /GX /O2 /I "..\\" /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c BSC32=bscmake.exe diff --git a/servers/slapd/back-ldbm/delete.c b/servers/slapd/back-ldbm/delete.c index ab35a12a04..66dcb8487c 100644 --- a/servers/slapd/back-ldbm/delete.c +++ b/servers/slapd/back-ldbm/delete.c @@ -105,7 +105,7 @@ ldbm_back_delete( Debug(LDAP_DEBUG_ARGS, "<=- ldbm_back_delete: non leaf %s\n", dn, 0, 0); send_ldap_result( conn, op, LDAP_NOT_ALLOWED_ON_NONLEAF, - NULL, NULL, NULL, NULL ); + NULL, "subtree delete not supported", NULL, NULL ); goto return_results; } @@ -115,8 +115,8 @@ ldbm_back_delete( Debug( LDAP_DEBUG_TRACE, "<=- ldbm_back_delete: parent does not exist\n", 0, 0, 0); - send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, - NULL, NULL, NULL, NULL ); + send_ldap_result( conn, op, LDAP_OTHER, + NULL, "could not locate parent of entry", NULL, NULL ); goto return_results; } @@ -152,8 +152,8 @@ ldbm_back_delete( Debug(LDAP_DEBUG_ARGS, "<=- ldbm_back_delete: operations error %s\n", dn, 0, 0); - send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, - NULL, NULL, NULL, NULL ); + send_ldap_result( conn, op, LDAP_OTHER, + NULL, "DN index delete failed", NULL, NULL ); goto return_results; } @@ -162,8 +162,8 @@ ldbm_back_delete( Debug(LDAP_DEBUG_ARGS, "<=- ldbm_back_delete: operations error %s\n", dn, 0, 0); - send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, - NULL, NULL, NULL, NULL ); + send_ldap_result( conn, op, LDAP_OTHER, + NULL, "entry delete failed", NULL, NULL ); goto return_results; } diff --git a/servers/slapd/back-ldbm/modrdn.c b/servers/slapd/back-ldbm/modrdn.c index 0d8a3114a4..1a58947967 100644 --- a/servers/slapd/back-ldbm/modrdn.c +++ b/servers/slapd/back-ldbm/modrdn.c @@ -296,7 +296,7 @@ ldbm_back_modrdn( "ldbm_back_modrdn: can't figure out type of newrdn\n", 0, 0, 0 ); send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, - NULL, NULL, NULL, NULL ); + NULL, "unknown type used in RDN", NULL, NULL ); goto return_results; } @@ -307,7 +307,7 @@ ldbm_back_modrdn( "ldbm_back_modrdn: can't figure out val of newrdn\n", 0, 0, 0 ); send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, - NULL, NULL, NULL, NULL ); + NULL, "could not parse RDN value", NULL, NULL ); goto return_results; } @@ -323,8 +323,8 @@ ldbm_back_modrdn( Debug( LDAP_DEBUG_TRACE, "ldbm_back_modrdn: can't figure out old_rdn from dn\n", 0, 0, 0 ); - send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, - NULL, NULL, NULL, NULL ); + send_ldap_result( conn, op, LDAP_OTHER, + NULL, "could not parse old DN", NULL, NULL ); goto return_results; } @@ -334,8 +334,8 @@ ldbm_back_modrdn( Debug( LDAP_DEBUG_TRACE, "ldbm_back_modrdn: can't figure out the old_rdn type\n", 0, 0, 0 ); - send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, - NULL, NULL, NULL, NULL ); + send_ldap_result( conn, op, LDAP_OTHER, + NULL, "count parse RDN from old DN", NULL, NULL ); goto return_results; } @@ -381,8 +381,8 @@ ldbm_back_modrdn( Debug( LDAP_DEBUG_TRACE, "ldbm_back_modrdn: can't figure out old_rdn_val from old_rdn\n", 0, 0, 0 ); - send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, - NULL, NULL, NULL, NULL ); + send_ldap_result( conn, op, LDAP_OTHER, + NULL, "cound not parse value from old RDN", NULL, NULL ); goto return_results; } @@ -423,7 +423,7 @@ ldbm_back_modrdn( /* delete old one */ if ( dn2id_delete( be, e->e_ndn, e->e_id ) != 0 ) { send_ldap_result( conn, op, LDAP_OTHER, - NULL, NULL, NULL, NULL ); + NULL, "DN index delete fail", NULL, NULL ); goto return_results; } @@ -441,7 +441,7 @@ ldbm_back_modrdn( /* add new one */ if ( dn2id_add( be, e->e_ndn, e->e_id ) != 0 ) { send_ldap_result( conn, op, LDAP_OTHER, - NULL, NULL, NULL, NULL ); + NULL, "DN index add failed", NULL, NULL ); goto return_results; } @@ -467,7 +467,7 @@ ldbm_back_modrdn( if ( id2entry_add( be, e ) != 0 ) { entry_free( e ); send_ldap_result( conn, op, LDAP_OTHER, - NULL, NULL, NULL, NULL ); + NULL, "entry update failed", NULL, NULL ); goto return_results; } diff --git a/servers/slapd/back-ldbm/passwd.c b/servers/slapd/back-ldbm/passwd.c index bafe00d6af..849ec5dbe8 100644 --- a/servers/slapd/back-ldbm/passwd.c +++ b/servers/slapd/back-ldbm/passwd.c @@ -64,7 +64,7 @@ ldbm_back_exop_passwd( if( new == NULL || new->bv_len == 0 ) { *text = "password generation failed."; - rc = LDAP_OPERATIONS_ERROR; + rc = LDAP_OTHER; goto done; } @@ -75,7 +75,7 @@ ldbm_back_exop_passwd( if( hash == NULL || hash->bv_len == 0 ) { *text = "password hash failed"; - rc = LDAP_OPERATIONS_ERROR; + rc = LDAP_OTHER; goto done; } @@ -148,7 +148,8 @@ ldbm_back_exop_passwd( if( rc == LDAP_SUCCESS ) { /* change the entry itself */ if( id2entry_add( be, e ) != 0 ) { - rc = LDAP_OPERATIONS_ERROR; + *text = "entry update failed"; + rc = LDAP_OTHER; } } -- 2.39.5